If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Returning the entered date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-03, 16:01
skan skan is offline
Registered User
 
Join Date: Jul 2003
Posts: 17
Red face Returning the entered date

My question might be stupid but How to retrieve records for a date that I would like to determine?

Means I would like to have a parameter where I can enter the date I want to retrieve my records.

At the beginning I had it set up as: Between [Beginning Date] And [Ending Date]. Now I just want One parameter

Thanks for your help
Reply With Quote
  #2 (permalink)  
Old 07-17-03, 16:05
aruneeshsalhotr aruneeshsalhotr is offline
Registered User
 
Join Date: Jul 2003
Location: US
Posts: 314
Arrow Strange

Hi
I am not sure if I fully understand your question.
you could do something like

select orderid, ordername from ordertable where dt_ordered = to_date('DATE_REQUIRED','YYYY/MM/DD');

Make sure DATE REQUIRED is of the format 'YYYY/MM/DD'.
Thanx and Regards
Aruneesh
Reply With Quote
  #3 (permalink)  
Old 07-17-03, 16:31
skan skan is offline
Registered User
 
Join Date: Jul 2003
Posts: 17
Red face Re: Strange

I want SQL to retrieve all the records to the corresponding date that I'll enter.

Means I'll have one pop up parameter where I enter the date I want.

I have a already one pop up parameter in my SQL statement for country which is: Like [Country:].
When I run my query a parameter pop up and I return the country I want.

I would like to do the same thing with the Date. Having a parameter where I enter the date I want.

Thanks
Reply With Quote
  #4 (permalink)  
Old 07-17-03, 18:45
aruneeshsalhotr aruneeshsalhotr is offline
Registered User
 
Join Date: Jul 2003
Location: US
Posts: 314
Arrow Clarification

I wanted to get some clarification on the scenario.
I dont under what popup you are mentioning here.

Are you anyway using VB to link it to some DB.
Please clarify the popup portion.
Thanx and Regards
Aruneesh
Reply With Quote
  #5 (permalink)  
Old 07-18-03, 16:19
skan skan is offline
Registered User
 
Join Date: Jul 2003
Posts: 17
Re: Clarification

The pop portion is just a parameter that pops up when you run your query.

In access your query can be presented in 3 ways: Design View, Table View and SQL view.

I'm working out of the Design view and when you specify a parameter in the criteria part of a field, it will pop up as a parameter when you run your Table view.

Anyway I found the solution. For the date and to return the date that you want on your parameter you just set the criteria as this:
Like [Date:] in your date field. In SQL it's translated like this:
WHERE Table.OrderDate = [Date:]

And now I bumped into another issue:
How to return the text that I want in my parameter. Means I want to look for a word in the whole title and the query will run the companies that contain that word.
I don't want to specify the word in my SQL statement I want to leave it open like I've done above for the date. (I'm working out of Access Database)

Thanks for the help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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