Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Query les than or greater than with a COUNT

    Cant figure it out.
    Syntax error (missing operater) in query expression . . .

    It's the last line of code that is throwing in the error.

    Code:
    SELECT OCActiveListingResearch.DateStatusChange
    , OCActiveListingResearch.ListPriceOriginal
    , OCActiveListingResearch.ListPrice
    FROM OCActiveListingResearch
    WHERE (((OCActiveListingResearch.Status)="A") AND ((OCActiveListingResearch.DateStatusChange) Between [enter Start Date] And [enter END Date]))
    And (OCActiveListingResearch.ListPrice)> (OCActiveListingResearch.ListPriceOriginal));
    Thanks much.

    Rick

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    I would drop the Between and just use >= <=

    also When I getting the computer asking a Question [enter Start Date] put ?? in [enter Start Date ??]
    only so that you know that when its asking for something you know its something you told it to ask
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Oct 2014
    Posts
    268
    Provided Answers: 6
    You have too many of these ) and not enough of theses (.

    SELECT OCActiveListingResearch.DateStatusChange
    , OCActiveListingResearch.ListPriceOriginal
    , OCActiveListingResearch.ListPrice
    FROM OCActiveListingResearch
    WHERE ((OCActiveListingResearch.[Status] = "A") AND ((OCActiveListingResearch.DateStatusChange) Between [enter Start Date] And [enter END Date])
    And (OCActiveListingResearch.ListPrice) > (OCActiveListingResearch.ListPriceOriginal));
    Try that.

  4. #4
    Join Date
    Mar 2004
    Location
    California
    Posts
    502
    E X C E L L E N T!

    Those suggestions really did the trick.

    Thanks much!

    Rick

Posting Permissions

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