Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.