Results 1 to 3 of 3

Thread: Query Issue

  1. #1
    Join Date
    May 2004
    Posts
    86

    Unanswered: Query Issue

    Im trying to run a certaian query. If thew vaules of form amount and paid AMOUNT dont equal then i want them to show. If they are = then i dont want them to show. SO if Form amount has $10 and paid Amount has $20 then i want it to show.


    SELECT CFR.CFR_PATNAME, CFR.CFR_DCN, CFR.CFR_LINSEQ, (Val([CFR_ALLOWED])-Val([CFR_DEDUCT])-Val([CFR_OTHER])-Val([CFR_Coins])-Val([CFR_COBAMT]))/100 AS [Form Total], Format([Form Total],"$.00") AS [Form AMOUNT], Format([CFR_PAID])/100 AS PAID,Format([PAID],"$.00") AS [PAID AMOUNT]
    FROM CFR
    WHERE Not IN Format([Form Amount],"$.00") = Format([PAID Amount],"$.00");

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    I think this is what your after

    Code:
    SELECT CFR.CFR_PATNAME,
                 CFR.CFR_DCN,
                 CFR.CFR_LINSEQ,
                 (Val([CFR_ALLOWED])-Val([CFR_DEDUCT])-Val([CFR_OTHER])-Val([CFR_Coins])-Val([CFR_COBAMT]))/100 AS [Form Total],
                 Format([Form Total],"$.00") AS [Form AMOUNT],
                 ([CFR_PAID])/100 AS PAID,
                 Format([PAID],"$.00") AS [PAID AMOUNT]
    FROM CFR
    WHERE (Val([CFR_ALLOWED])-Val([CFR_DEDUCT])-Val([CFR_OTHER])-Val([CFR_Coins])-Val([CFR_COBAMT]))/100 <> ([CFR_PAID])/100
    Dave

  3. #3
    Join Date
    May 2004
    Posts
    86

    thanks

    That Did it

Posting Permissions

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