RE: easy query help

2004-11-17 Thread Tangorre, Michael
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Hey all, I have three tables for an office mgmt app that I am running:
 I need to get a query that, provided the company_ID, will 
 capture all the domains associated with the company, as well 
 as those domains that have SSL info.

SELECT
C.*,
D.*,
S.*
FROM
Companies C
INNER JOIN domains D 
ON (C.company_ID = D.domain_company_FK)
LEFT JOIN SSL_Info S 
ON (D.domain_ID = S.SSL_domain_FL)
WHERE
C.company_ID = #companyId#


Change C.*, D.*, and S.* to the columns you specifically want.

Mike

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184660
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: easy query help

2004-11-17 Thread Ray Champagne
Thanks, Michael.  That was a lot more complicated than I thought it was.

I definitely learned something today!

Ray

At 03:40 PM 11/17/2004, you wrote:
  From: Ray Champagne [mailto:[EMAIL PROTECTED]
  Hey all, I have three tables for an office mgmt app that I am running:
  I need to get a query that, provided the company_ID, will
  capture all the domains associated with the company, as well
  as those domains that have SSL info.

SELECT
 C.*,
 D.*,
 S.*
FROM
 Companies C
 INNER JOIN domains D
 ON (C.company_ID = D.domain_company_FK)
 LEFT JOIN SSL_Info S
 ON (D.domain_ID = S.SSL_domain_FL)
WHERE
 C.company_ID = #companyId#


Change C.*, D.*, and S.* to the columns you specifically want.

Mike



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184661
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54