Skip to content
Advertisement

Tag: oracle12c

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):

Oracle query, get count of records by hour

I am trying to get transaction counts for every hour. Normally it is a straight forward query by unfortunately the timestamp column I have to work with is not timestamp but varchar2! No matter what I try I get either “not a valid month” or “invalid number”, depending on the format I use. The timestamp looks like: 2021-08-08 00:00:52:632 I

Missing IN or OUT parameter in Oracle SQL

Im getting an error on this parte of SQL{ “U” = UPPER(:codigo) }. When i remove the variable and hardcode :codigo as u or U it works fine. The erro i receive is Missing In or Out parameter. I’m receiving this error on Oracle 12c Service Bus Full SQL: Answer The problem was: Each time variable :posicao was referenced my

Data inserting in between the rows in table

I have a table which has around 1,000,000 records. I noticed that when I insert a record it does not get inserted at last instead it gets inserted in between Example My table (testing) Si. Name. Address. 1. Test. 1/2 test 2. Test. 3/4 test Si has a unique index created but no primary keys defined So when I make

Oracle hierarchical queries data

The link gives a good example for overview on how to use Oracle hierarchical queries. I was trying to generate the below combination of data with the example table tab1 given in the link but struck …

Advertisement