Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> query which returms date URGENT

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: query which returms date URGENT
 sunil  Posted: Mar 26, 2007 07:00:18 AM

 Total Post: 20
 Joined: Nov, 2006






 Hi All

Can i have a qurey which returns the 2nd row from follwoing data

trunc(run_date)
3/26/2007
3/23/2007
3/22/2007
3/21/2007
3/20/2007
3/19/2007
3/15/2007

thanks in advance,

Sunil

 Oracle Virus
Posted: Mar 26, 2007 09:38:21 AM  

 Total Post: 50
 Joined: Jan, 2007






 
Dear Sunil,
Without having the criteria, i guess it is not possible to fetch the date like that. If you give me the criteria, I can give you the query.

Regards,
Aneel Kanuri

 sunil
Posted: Mar 26, 2007 10:04:46 AM  

 Total Post: 20
 Joined: Nov, 2006






 
this is the criteria. I think you can get it

Hi all,
I have a table with following four cols

file_size run_date prev_day_file_size status


the prev_day_file_size should be updated with file_size of last run_date

thanks in advance,

Sunil

 Oracle Virus
Posted: Mar 26, 2007 10:22:57 AM  

 Total Post: 50
 Joined: Jan, 2007






 
Dear Sunil,
I guess max(run_date) will help you. Only thing is you have to use it in proper place. max(run_date)+1 or -1 will surely help you. Please choose the correct place you have to use that.

Regards,
Aneel Kanuri

 parth
Posted: Apr 02, 2007 12:16:02 PM  

 Total Post: 17
 Joined: Apr, 2007






 
select date from (select rownum r, date from (select date from <TABLE_NAME> order by date DESC)) where r= &Position;

-- Try out above query, probably it will work
PArth

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software