473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Date Selected query parameter

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
1 3037
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Bernd Hohmann | last post by:
Hi there, we're currently convert an old ISAM application to Java and DB2. Among the load of problems we found the reports which have user selections like "select all data between mm/yyyy and...
1
by: Dalan | last post by:
I have attempted to resolve a problem regarding erroneous output using a Between And parameter on several Access 97 queries, but to no avail. The queries are used for report output and...
10
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for...
4
by: Tony | last post by:
Hey guys, I use Google Groups quite a bit as it is an enormous wealth of information, and now I need some help. I have created a query using parameters to capture a range of date, the date is...
3
by: Melissa | last post by:
I have this table: TblProjectYear ProjectYearID ProjectYearStartDate ProjectYearEndDate The Project Year will always span across December 31; for example 9/1/04 to 6/30/05. How do I build a...
2
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result....
2
by: sixdeuce62 | last post by:
Hello, I am trying to create a query that will prompt me to enter the parameter value if beginning date and ending date. I have created everything I need in the query, but I have to manually go...
2
by: Jim Devenish | last post by:
I wish to create a crosstab query as the record source for a report. It needs to count data between selected dates which are entered by the user in a popup window. The following Select query...
3
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.