Home » SQL & PL/SQL » SQL & PL/SQL » Loop function between dates
Loop function between dates [message #265377] Thu, 06 September 2007 04:02 Go to next message
fahrenheit
Messages: 4
Registered: August 2007
Junior Member
i have a simple select statement that requires two parameters
start date and end date.

However due to data issue i can only run this as a simple statement through a weekly period at a time.

How do i embed the sql with a loop statement so that i can set a longer period and the function will break down and run the statement for weekly intervals.
Re: Loop function between dates [message #265386 is a reply to message #265377] Thu, 06 September 2007 04:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
By reading SQL Reference and PL/SQL User Guide.
With the information you give, what do you expect us to answer?

Regards
Michel
Re: Loop function between dates [message #265467 is a reply to message #265386] Thu, 06 September 2007 06:57 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Are you looking for DBMS_JOB (or DBMS_SCHEDULER), perhaps?
Re: Loop function between dates [message #265673 is a reply to message #265377] Thu, 06 September 2007 23:24 Go to previous message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:
How do i embed the sql with a loop statement
You can't.

If you supply only the bare minimum of info, we can only give bare minimum answers.
Previous Topic: subquery problem
Next Topic: need query without using func
Goto Forum:
  


Current Time: Sun Dec 04 22:50:39 CST 2016

Total time taken to generate the page: 0.04354 seconds