Skip to content
Advertisement

Tag: oracle19c

Need to get appropriate/expected row number in Oracle PLSQL

Getting the following output when i use the below query But the expected output should be as below (Refer RowNumber column) Answer First find “groups” each of those rows belongs to (partitioned by refnum and name) (that’s what the temp CTE does), and then apply dense_rank to fetch the final result. Sample data (simplified, as I don’t have your tables):

how to retrive data from VARRAY and filter it

i have to retrieve specific data from Varray for example i want to retrieve the name where VARRAY includes AC1 i tried select * from exprement where seat=’AC1′; Answer You can use: or As an aside, if you defined seat as a nested table (rather than a VARRAY) then you could use the MEMBER OF operator: But that doesn’t work

trim function not working on result of to_char

The query gives the result 3 as expected but the query: gives 003 I need the result to be as the first query (‘3’) but I also need the ‘TO_CHAR’ (I’m using it to create a virtual column from a NUMBER column). I can not figure why and how to fix it. Also, I can not use regex_replace instead. Answer

Put a json inside another json on Oracle 19

i have the next problem. I need create a json from a table that contain another json inside in one of the columns Having this: i try with this query: But the result is not correct: Must be something like: There is a way to get the correct result? Regards. Answer after see examples and see the resuslts. I know

Oracle SQL where clause does not work for some dates

Below query works fine with the recent dates (for e.g. if the date is 20-JUN-16, 30-SEP-19). But if I query with date value set to 29-MAR-80, 01-JAN-94 it does not return any result. Wondering what could be the reason. Am not allowed to change the existing year format to YYYY. We are on Oracle 19c. Answer Here, your date ’01-FEB-80′

Advertisement