Query Help
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Query Help

Threaded View

  1. #1
    Join Date
    Dec 2000
    Location
    Virginia, USA
    Posts
    455

    Query Help

    I have following table
    Company Product Rec_Company
    ABC 101 NY
    EFG TX
    HIG 202 TX
    ABC 101 CA
    ABC 101 NY
    EFG NY
    HIJ 202 CA
    ABC 101 FL

    I want following result

    Company Product Rec_Company Rec_Count Product Rec_Company Count
    ABC 101 NY 2 NULL FL 1
    EFG
    HIG

    Let's take the result of first row
    Company ABC used product 101, and receive company was NY, and product was used 2 times, also ABC company has NULL product and recive company was FL, and so on with EFG and HIG company

    Notice that result in one row.

    Thanks in Advance

    For better viewing see notepad attachment
    Last edited by irehman; 12-21-2002 at 10:17 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width