Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    18

    Red face Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Jul 2003
    Posts
    18

    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

  4. #4
    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

  5. #5
    Join Date
    Jul 2003
    Posts
    18

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •