Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by abheja

  1. abheja

    Quering multiple tables

    Ha! This works!! What I've been doing is the following: SELECT * FROM A WHERE NOT EXISTS(SELECT * FROM A,B WHERE B.ssn=A.ssn AND B.orderid=A.orderid) Sorry, I am new to SQL so trying to understand why this did not work. Thanks so much, PHV!!!
  2. abheja

    Quering multiple tables

    Thanks PHV, however what I am trying to find is the following. A -ssn -orderid B -ssn orderid I want the Customers(SSN) in A whose order(orderid) is not in B. SSN is unique but order id is not so customers could have the same orderid. Thanks
  3. abheja

    Quering multiple tables

    I have two TABLES [A] and [B] with these attributes. A -ssn -id1 B -ssn id2 I want to find all SSN from A whose id1 does not exist in id2. I can find all ssn in A not in SSN B. Select * from A where ssn not in(select ssn from A, B where a.ssn=b.ssn) but how do I get all the SSN and the ID1...

Part and Inventory Search

Back
Top