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

    Unanswered: Comnfused Query . . .

    Here is what I'm trying to do.
    Query OfficeNameTbl.OfName ;howerever many there are. 16 in this case

    Against DATATBL.ListName AND DATATBL.SellName with the following calculations.

    Where DATATBL.listName and DATATBL.SellName are match
    ,SUM DATATBL.SalePrice AS WSO
    ,count DATATBL.ListName AS RECS

    Where DATATBL.listName DOES NOT MATCH DATATBL.SellName
    ,SUM DATATBL.SalePrice AS TSO
    ,count DATATBL.ListName AS RECS

    Where DATATBL.SellName DOES NOT MATCH DATATBL.ListName
    ,SUM DATATBL.SalePrice AS WST
    ,count DATATBL.ListName AS RECS

    If this is confusing just think how long it took me to come up with the words to describe it. Ha!

    Please . . . PLEASE be gentle on me.

    Thanks much!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Rick Schreiber
    If this is confusing just think how long it took me to come up with the words to describe it. Ha!
    you forgot to mention how to join the tables

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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