Skip to content
Advertisement

Tag: oracle11g

Query with rownum got slow

I have got a table table with 21 millions records of which 20 millions meet the criterion col1= ‘text’. I then started iteratively to set the value of col2 to a value unequal to NULL. After I have mutated 10 million records, the following query got slow, that was fast in the beginning: I noticed that as soon as I

SQL CASE Statement for no data

I have a table that has process engines 1,2,3,4,5,6 with a running status. When one of the engines is down the record gets deleted from the table. Using a case statement I can display the first engine that is down but how do I go about displaying the engines if 2 or more engines are down. For e.g. how do

Nth max salary in Oracle

To find out the Nth max sal in oracle i’m using below query But According to me by using the above query it will take more time to execute if table size is big. i’m trying to use the below query but not getting output.. any suggetions please .. Please share any link on how to optimise queries and decrease

Weekday number regardless of the NLS settings

I’m looking for the simplest way to determine the weekday number for the DATE value in oracle independent of the NLS settings. Any ideas? Answer ISO weeks start on Monday; they don’t use NLS settings. I think this expression is reliable. To show how the arithmetic works . . . current_date is a Wednesday. In general, if you can’t find

Advertisement