Tried this:

          <CFQUERY Name="Get_Client" Datasource="#DSN#">

               Select C.*, FG.*, E.*
                          from clients C
                   inner join family_groups FG on C.Family_ID = FG.Family_ID
                           inner join employers E on C.Employer_ID =
E.Employer_ID
                                where C.Family_ID =
                             ( Select Family_ID
                                              from clients
                                            where Client_ID =
'#Session.Client_ID#')
                                               and C.Employer_ID =
                                                     ( Select Employer_ID
                                                          from clients
                                                        where Client_ID =
'#Session.Client_ID#')

          </CFQUERY>

But no change in the data...

Rick




-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Friday, March 31, 2006 1:31 PM
To: CF-Talk
Subject: RE: Anything inherently wrong with this query?


> Anything inherently wrong with this?
>
>           <CFQUERY Name="Get_Client" Datasource="#DSN#">
>
>                Select C.*, FG.*, E.*
>                  from clients C
>            inner join family_groups FG, employers E
>                    on C.Family_ID = FG.Family_ID
>                   and C.Employer_ID = E.Employer_ID
>                 where C.Family_ID =
>                        ( Select Family_ID
>                          from clients
>                         where Client_ID = '#Session.Client_ID#')
>                           and C.Employer_ID =
>                               ( Select Employer_ID
>                                   from clients
>                                  where Client_ID =
> '#Session.Client_ID#')
>
>           </CFQUERY>

Yes, your JOIN syntax is incorrect:

INNER JOIN family_groups FG ON C.Family_ID = FG.Family_ID
INNER JOIN employers E ON C.Employer_ID = E.Employer_ID

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236719
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

Reply via email to