Jump to content

Help with a select


nam797

Recommended Posts

Hello All,

 

I am having a problem with a select statement. I am joining 3 tables and it is not showing correctly. I know it has something to do with my select statement. Here it is

 

SELECT VendCrews.CrewID, VendCrews.Company, VendCrews.Fax, VendCrews.City, VendCrews.Inactive, tblTrades.Trade, VendCrewCnts.Name
						FROM (VendCrews INNER JOIN VendCrewCnts ON VendCrews.CrewID = VendCrewCnts.CrewID) INNER JOIN (VendCrewsTrades INNER JOIN tblTrades ON VendCrewsTrades.TradeID = tblTrades.TradeID) ON VendCrews.CrewID = VendCrewsTrades.CrewID WHERE VendCrews.Inactive = 'Active' Group BY Company ORDER BY Company

 

Row Example

79

[/td]

[td]

A-1 Sheet Metal & Roofing, Inc.

NULL

NULL

Active

Roofing

John Deleski

 

Where it shows roofing there might be more than one(Roofing,siding,decks) that this subcontractor might do.

 

Thanks for the help

Link to comment
https://forums.phpfreaks.com/topic/138057-help-with-a-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.