Last post Jan 10, 2013 11:09 PM by april_123456
Jan 07, 2013 03:15 AM|brigader|LINK
Can any one help me to find the missing numbers in a list of numbers by Oracle Sql Query?
Here is the senario,
following is a SQL Table with only one column,
| SNo |
In the above table i need to find a missing numbers from the 1 to 10 series, at prod machine the range could be 1 to 500000 or more than 5 Lak too.
Finally i need a query, that should return the missing numbers as follows,
| Missing Numbers|
Can any one help me to find the missing numbers using the Oracle sql Query?
Jan 07, 2013 04:46 AM|rimagandhi|LINK
SELECT distinct number
WHERE number BETWEEN 1 and (SELECT max(id) FROM MyTable)
AND number NOT IN (SELECT id FROM MyTable)
Jan 07, 2013 04:54 AM|adeelehsan|LINK
See the following:
Jan 10, 2013 11:09 PM|april_123456|LINK
With regards to your question, please refer to the following:
It contains information and questions similar if not identical to you own.
Hope this helps!
Best of Luck!
With Kind Regards,