Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
skillile
Posting Yak Master
208 Posts |
Posted - 2001-11-01 : 11:31:10
|
| I am pulling my hair out. I have these tables:company profileusercustomerorders tableaddress of ordersInside the companies table I have all customer companies and all of my branches. CID is the key for the co. IDI want to see all orders for a specific [customer company] with thecustomer companies address that is associated with the branch .CID 11 = the branch I want to seeCCID is in customer company table relates back to CID in comp profHere goes:SELECT a.compname, b.fname + ' ' + b.lname as fullname, c.OID FROM tblcompprof a INNER JOIN tblusercust b ON a.CID=b.CCID INNER JOIN tblorder c ON b.CTUID=c.CTUID INNER JOIN tblproperty ON "HELP HERE" WHERE c.MCID=11any help appreciatedslow down to move faster... |
|
|
|
|
|