Skip to content
Advertisement

Tag: oracle-sqldeveloper

Searching for a string in a column

I need to show the results from this column where Product_name column contains ‘Documentation’ or ‘documentation’ in a result. The query must return a result regardless of whether the word is in lowercase or uppercase https://i.stack.imgur.com/bjLuY.png I found this solution, any suggestions Answer

Get first row that is null in Oracle DB table

I have the following table rownum ID date owner 1 1 09/01/2022 null 2 1 09/02/2022 null 3 1 09/03/2022 Joe 4 1 09/04/2022 null 5 1 09/05/2022 Jack 6 2 09/01/2022 null 7 2 09/02/2022 John 8 2 09/02/2022 John 9 2 09/02/2022 John For every ID, I want to select the first occurrence of null that eventually results

Complex SQL Query For Counting and Listing

I need to write complex sql for counting distinct names popularity and sorting them with descending order. I’ll do this with hibernate @Query(“SELECT * FROM …”) parameter. First I tried to do it on SQL then implement it to my spring boot project but I’m stuck while writing it. Sorted version: Answer I think you are looking for group by.

How do I take user inputs in CASE statements in SQL?

This is the query I’m trying to execute in SQL Developer, but I get an error: Error at Command Line : 2 Column : 7 Error report – SQL Error: ORA-00904: “INPUT”: invalid identifier 00904. 00000 – “%s: invalid identifier” Can anyone help me out? Answer As Alex commented, if you want to use that substitution variable twice, you’d rather

Advertisement