Well, well, well!
It's Cote Jeff! Hehe. How have you been?
select *
from (select rownum row_num, A.*
from (select empno, ename, job, mgr,
hiredate, sal, comm, deptno
from emp) A
group by rownum, empno, ename, job, mgr,
hiredate, sal, comm, deptno) B
where B.row_num = 2
/
It's Fridayyyyyyyy! Partyyyyyyyyy! Red Stripe! Hehe.
Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Dr. Eric J. Smith is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
-----Original Message-----
From: Cote Jeff
[mailto:oracledba-ezmlmshield-x81527077.[Email address protected]
Sent: Friday, March 28, 2008 12:17 PM
To: LazyDBA Discussion
Subject: Finding the nth row
Good afternoon, gurus.
I have a table in which deletes and truncates occur regularly. I've now
been tasked with finding the 79,001 row in the table. This table has no
indexes, and is loaded nightly. Doing a query such as
Select * from table_name
Where rownum = 79001;
Returns no rows. There are currently 112,500 rows.
Does anyone have any insight (outside of creating a cursor to run
through the table until it hits the required row) on a simple SQL query
I could use?
Thanks in advance!
Jeff
Jeffrey Cote'
Sr. Oracle Database Admin.
H&R Block, Financial Advisors
313-628-1267
Jeff.[Email address protected] <mailto:Jeff.[Email address protected]
"Aut viam inveniam aut faciam."
Hannibal (247-182 BCE)
Note: This message, including attachments, is from H&R Block Financial
Advisors,
Inc., Member NYSE, SIPC. This is not a solicitation of any order to buy
or sell. The
information contained herein is deemed to be reliable but is in no way
warranted by us as
to accuracy or completeness. Messages are monitored and retained by the
Company, but
the company cannot guarantee the security of this message. The company,
and its
associates, may not accept orders to affect purchase or sale
transactions, accept funds,
securities, or similar instructions via email. If you are not the
intended recipient of this
message promptly delete this message and notify the sender of the
delivery error by
return email or calling 1.800.HRBLOCK and selecting the option for
'Financial Services'
You may not forward, print, copy, distribute, or use the information in
this message if
you are not the intended recipient.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page