Results 1 to 2 of 2

Thread: Odd sql error

  1. #1
    Join Date
    Apr 2006
    Posts
    47

    Unanswered: Odd sql error

    This sql works :
    SELECT Master.CheckNum, Deal.Deal, Detail.Person, Detail.InvoiceDate, Detail.InvoiceAmount, Detail.idDetial, Detail.Billed
    FROM Master INNER JOIN (Deal INNER JOIN Detail ON Deal.Deal = Detail.Deal) ON Master.CheckNum = Detail.CheckNum
    WHERE (((Master.CheckNum) Not Like "AMEX*") AND ((Deal.Deal) Not Like "*MGMT Cost*" And (Deal.Deal) Not Like "U") AND ((Master.CheckDate)>#12/31/2005#) AND ((Deal.DropDown)="R"))
    ORDER BY Detail.Billed;

    i get items with billed (last colm) values of null & ReQ106

    i dont want to see the "ReQ106" detials so i change the sql to :
    SELECT Master.CheckNum, Deal.Deal, Detail.Person, Detail.InvoiceDate, Detail.InvoiceAmount, Detail.idDetial, Detail.Billed
    FROM Master INNER JOIN (Deal INNER JOIN Detail ON Deal.Deal = Detail.Deal) ON Master.CheckNum = Detail.CheckNum
    WHERE (((Master.CheckNum) Not Like "AMEX*") AND ((Deal.Deal) Not Like "*MGMT Cost*" And (Deal.Deal) Not Like "U") AND ((Detail.Billed)<>"ReQ106") AND ((Master.CheckDate)>#12/31/2005#) AND ((Deal.DropDown)="R"))
    ORDER BY Detail.Billed;

    and my results are nothing, i tried like cluases and nothing works help!!!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What's with all the paranthesis?

    Also, make sure you don't have garbage data in that field containing "ReQ106". try using:
    (Detail.Billed) NOT LIKE "*ReQ106*")
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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