By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

Date Selected query parameter

P: n/a
ED
I currently have an ODBC query that hits an Oracle database. I want
to bring back records for a given month based on a job completion date
in the Oracle database. I would like to have the user define what
date range that is, restricting to a month period. I do not want to
have to have to develop a lookup table for month and year. I was
wondering how I could use a calendar function or something similar to
populate the month and year in order to pass into my ODBC query. In
other words I would need to select 6/1/2003 as the beginning date and
6/30/2003 as the end dae. Any help would be great.

Thanks!!
Ernie
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ernie
1st method is to use MS Access query on a linked Oracle table. You can
have a field Month([job complete date)] with a criteria =[Enter month
number: ]
2nd method I think you describe in your message. I take it that ODBC
query is pass-through query, which contains Oracle SQL.
When I use a pass-through query, I modify it dynamically: create SQL
in code and assign it to the query:
CurrentDb.QueryDefs("CheckEnrolment").SQL = mySQL
If you follow this way, you will need a form to enter a month with a
button OK. When user enters month and clicks OK, a code generates
Oracle SQL with start and end dates of the month as criterias. You
will need 2 functions: to calculate start date of month and end date
of month.
Oracle Sql is assigned to the pass-through query. The report based on
this query is starte - from code.
There is possibly a combination of 2 methods: I heard today that
Oracle now can take MS Access SQL in pass-through queries. It this is
correct, you any way will need to generate MS Access SQL dynamically,
because I doubt that Oracle will be able to translate something like
Month([job complete date)]=[Enter month number: ].
Hope, it is of some help.
Galina
da******@hotmail.com (ED) wrote in message news:<ad*************************@posting.google.c om>...
I currently have an ODBC query that hits an Oracle database. I want
to bring back records for a given month based on a job completion date
in the Oracle database. I would like to have the user define what
date range that is, restricting to a month period. I do not want to
have to have to develop a lookup table for month and year. I was
wondering how I could use a calendar function or something similar to
populate the month and year in order to pass into my ODBC query. In
other words I would need to select 6/1/2003 as the beginning date and
6/30/2003 as the end dae. Any help would be great.

Thanks!!
Ernie

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.