LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Passing parameter to a select query

I have a worksheet that I need to update on a daily basis
with data from an external Oracle database. I am using
the following query which gets yesterday's data (the Oracle
data is always for the previous day).

SELECT Sum(recno) FROM mailboxes
WHERE (trunc(logdate)=trunc(sysdate-1))

This sums the values in the rec_no column for all rows
that were logged yesterday. The thing is that on a Monday,
I need to get the data for both Saturday and Sunday so
would need to be able to pass the date as a parameter
rather than having to manually change the query.

How does one do this?

Many thanks,
Seamus


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameter to a ms query redf1re Excel Programming 6 February 7th 06 10:39 PM
Passing a Sub's name as parameter Stefi Excel Programming 7 June 20th 05 08:48 PM
Passing parameter to a query Dwaine Horton[_3_] Excel Programming 6 April 26th 05 02:24 AM
?Passing argument/parameter just starting[_2_] Excel Programming 0 October 23rd 04 07:56 PM
?Passing argument/parameter just starting Excel Programming 1 October 23rd 04 04:23 PM


All times are GMT +1. The time now is 03:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"