I’m trying to write a PL-SQL query to return records from multiple table and using decode to allow null value comparison, The result is returning only where DeptName is exactly matching to the database values, but I want a query to return something e.Department like ‘%DeptName%’ Answer No ne…
Need help transposing data from one column based on criteria SQL
I’m challenged with summarising the total estimated machine time vs the total actual machine time for a list of jobs based on a date field. The issue is that all estimate and actual entries are in …
Add Column in a table [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed last year. Improve this question Am trying to add a column in the table salesperson. And it is showing…
SELECT DISTINCT sum in google sheet
i’ve a sheet like this: Month(Col11) Team (Col2) 03 luna 03 luna 04 pippo 04 gigi 04 luna 04 gigi 04 pippo 04 luna 04 luna 04 pippo 04 pippo 04 grisbi 04 grisbi 05 luna 05 luna 05 pippo 05 pippo 05 grisbi 05 grisbi i need the sum of unique of each month, a result like this: Month(Col11)
How to update the columns in table only when an if condition is satisfied?
I am trying to update a table field by looking up into another table. The lookup contains id field and its corresponding name field. What I am trying to achieve is based on the match between the A …
How many bytes does an unsigned DECIMAL(3,2) use in MySQL
I was wondering how many bytes an unsigned DECIMAL(3,2) uses in SQL. The documentation that I find online is not very clear, especially not when you have an unsigned DECIMAL.
Combining multiple SQL select statements as columns
Combining multiple select statements as a columns, is not giving the desired output. What I’m missing here? Group by clause is not working as expected. Do I need to use GroupBy for outer Select as …
Optional variable in Graphql
I have a graphql query like this: when i run this it expects a id as variable. How can I make that variable optional? It should display all results when no id is given Answer There’s no way that I’m aware to declare a variable as optional but also have it ignore the rest of the expression in the w…
SQL Command isnt running (invalid identifier) maybe SYSDATE?
I’m having a bit of trouble getting my command to run and I think that it has something to do with the SYSDATE command: I get the ORA-00904: : invalid identifier error. Any fix? Answer The problem is the last field definition: Get rid of the comma and you’ll be fine. db<>fiddle here
How to show multiple tables list in MySql
How to show multiple table list in mysql I have a query that has two tables one for patients and the second one for patients who has tested for covid-19 I want to show all the patients either they tested or not If tested then show the result with his/her name It only showing the patients who has tested for