Date as a Parameter in MSQuery(SOLVED)

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
I want to query an oracle database and would like to use a parameter to return all records with an overdue inspection date (ie, Due Date is less than Today(). It need to be volatile as others need to run the query on a weekly basis. I can't seem to get it to function using either a prompt or a cell reference.
TIA
This message was edited by lenze on 2002-09-16 06:58
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I have a sheet with an MSQuery in it that uses something similar to what you seem to want. I have two parameter fields created in my msquery called [From] and [To]
In the criteria box in msquery the field i typed >=[From] (referring to "fr_date" in my sql table - likewise, the other parameter id <=[To]
Both refer to cells in my XL workbook which could return the value of a formula such as =today()
And I just tested it and it works fine...
Don't think there's any need for a more complex approach really....

I am using a much newer version on excel and having problems creating parameters in excel using a SQL query.

Any help would be appreciated.

-T
 
Upvote 0

Forum statistics

Threads
1,215,619
Messages
6,125,872
Members
449,267
Latest member
ajaykosuri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top