As an example, I have a Product entity, a ProductViewModel and a Label entity. Two of my product properties correspond to a label code rather than an actual value. So for example a Product’s Name is “…
Tag: sql
How to replace columns in a Queryable
SQL – Selecting from a multiples values field
I’m using Teampass, here is a minimised example of the tables schema Teampass_Roles_Title : and Teampass_Users the numbers in fonction_id are the ids from the table Teampass_Roles_Title Instead of using an intermediate table, they opted for this model, and I dont know if there is any way to have for exa…
Wrong number or types of arguments in call to ‘||’
We are supposed to read a text file, insert that data into a table while taking care of exceptions. This the code for my function: This is how i’ve called the function (but i think it’s wrong): And this is the error I’ve got: I tried to remove the results in the dbms_output and this is what …
Display duplicate column with increasing count in separate coloumn in sql
I want to increase count in count column one by one if the same Id is found in records. Don’t consider about auto increment of Id. MySQL version 8.0 and you can order by name column. I tried but not getting any solution. My table Employee looks like this I want to run sql query which will give output li…
Best technology for building race simulation application
I am trying to do something new, something I have never done before. I am looking for advice or point me into right direction how to choose technology. I am trying to build race simulation app that will have thousands of iot devices streaming data into central platform. While I understand that I can use some …
How to unset or make condition true, If passed variable is empty or null
I have a query… if the $id is empty or null, then I need to get all data from table where id is not null I already tried like following, But looking for the better solution without if condition, because I have lot of and conditions Thanks in advance… Answer Thank you so much @Akina for the comment…
List the films in which ‘Harrison Ford’ has appeared
Why is the answer to this question incorrect? Database Question: List the films in which ‘Harrison Ford’ has appeared My answer: Answer After correcting were -> where and removing the trailing X the syntax and result where correct. Error message indicated it was using MariaDB
Duplicate rows that belong to multiple groups before group by
Let’s say I have a table of customers and I want to group them depending on their first and last name and then get the mean age of each group. However, my rules are not mutually exclusive. For …
Postgres jsonb field to array
I was going through the Postgres Jsonb documentation but was unable to find a solution for a small issue I’m having. I’ve got a table : MY_TABLE that has the following columns: User, Name, Data and …
Spliting Name in Google BigQuery
Split FullName into firstName and lastName. I want to split the full name based on “,” into firstName and LastName. anything before “,” should be selected as firstName and anything “,” should be the lastName. I used split(fullName) function and used offset to grab the first…