User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 425,822 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,990 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 660 | Replies: 1
Reply
Join Date: May 2008
Posts: 33
Reputation: 2eXtreme is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
2eXtreme 2eXtreme is offline Offline
Light Poster

Same query for different dates

  #1  
Jul 2nd, 2008
Hey guys,

say im doing a query like:

select * from info where date = '21-APR-08'

but i want to do it for a number of different dates, how can i create an array to hold teh dates, and then for each date in the array, execute the query?

like say my array holds '21-APR-08, 28-APR-08, 05-MAY-08'

can i do a query like select * from info where date = <array value x>

where array value x is the array index, which increments upon each execution of the query? so it'd be the equivalent of doing:

select * from info where date = '21-APR-08'
select * from info where date = '28-APR-08'
select * from info where date = '05-MAY-08'

Thanks for any help
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,290
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 82
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: Same query for different dates

  #2  
Jul 2nd, 2008
try to use this

select * from info where date in (date1,date2,date3,.................)
Share your Knowledge.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Oracle Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Oracle Forum

All times are GMT -4. The time now is 4:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC