473,770 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3064
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.Query Defs("CheckEnro lment").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******@hotmai l.com (ED) wrote in message news:<ad******* *************** ***@posting.goo gle.com>...
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
9324
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 mm/yyyy". Means: if the user enters "10/2004 - 10/2005" everything between "2004-10-01" and "2004-10-31" is selected.
1
2236
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 regardless of the beginning and ending dates entered, the reports show all activity including before and after the dates entered. There is a frmAccount and two subforms sfrmPurchase and sfrm Sales. In order to isolate costs for each collectively, both...
10
2983
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 1jan2003. How do I remove the dates , 2jan2003 til 31jan2003 without removing them from the table, from the Query? (Because I want to use the data for 2jan2003 etc later in other queries) -kenneth
4
4482
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 also formatted. test: Format(,"mm/dd/yy") Between And
3
6621
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 combobox based on this table that will display all the months between the StartDate and the EndDate for a given ProjectYearID and when a selection is made, the full date of the last day of the selected
2
6517
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. I then want to search through the records and select those with dates (as caluclated above) within a user defined range, and so I am using a parameter query. However, this query returns dates outside of the range and appears to have particular...
2
14002
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 into SQL view to change the date range. This is what I have so far: TRANSFORM Count(.ID) AS CountOfID SELECT ., Count(.ID) AS FROM
2
3405
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 works: SELECT Tasks.EnquirySourceID, Tasks.BusinessUnitID, Count(Tasks.TaskID) AS CountOfTaskID FROM Tasks WHERE (((Tasks.TaskDate)>=!!)) GROUP BY Tasks.EnquirySourceID, Tasks.BusinessUnitID;
3
3542
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 sorting out a few glitches though. Since i upgraded from ms access database to MySQL, i have added about 4 articles to test the new setup. I note some fields aren't being added in the new mySql database for the new 4 records. When i ran the MySQK...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.