Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LEFT JOIN isn t supported

Status
Not open for further replies.

marsss

Programmer
Sep 24, 2004
116
US
I m trying to find why and can t fintd why my last LEFT JOIN isn t supported, if i change it for a INNER JOIN it work, but since the last block can be null and i still want see rest of data, so i realy need to put a LEFT JOIN

Is there any rule about making a LEFT JOIN with a sub-Select?


Code:
SELECT 

s.refService, 
s.refRepetitrice, 
c.refClient AS Client_ID,
s.Canal, 
t1.Tone AS [Tone Rx], 
t2.Tone AS [Tone Tx], 
s.AccessTel AS [Access Tel], 
s.ToneReserve AS [Tone Reservé], 
s.DateMES AS [Date Mise en Service], 
c.Nom AS Client, 
radio.[Nb Radio], 
s.NomService AS Service
 
FROM
(

(
(
(
(
tblService AS s 
INNER JOIN tblClient AS c 
ON s.refClient = c.refClient) 
INNER JOIN tblTone AS t2 
ON s.refToneRx = t2.refTone) 
INNER JOIN tblTone AS t1 
ON s.refToneTx = t1.refTone) 
LEFT JOIN tblClient AS cs 
ON cs.refClient=s.refSousClient)  

) 

LEFT JOIN

(
SELECT ss.refService, ss.refClient, Count(*) AS [Nb Radio] FROM (tblService AS ss
INNER JOIN tblListEquiService AS les 
ON ss.refService = les.refService) 
INNER JOIN tblEquiClient AS ec 
ON les.refEquiClient = ec.refEquiClient 
WHERE ec.refClient=ss.refClient 
GROUP BY ss.refService, ss.refClient
) AS radio 

ON (radio.refService = s.refService) AND (radio.refClient = c.refClient)

WHERE 
(
s.refRepetitrice=[Repetitrice]
AND radio.refService=[s].[refservice]
);

Thx for help
 
Okm find my answer finaly

Code:
A LEFT JOIN or a RIGHT JOIN can be nested inside an INNER JOIN, but an INNER JOIN cannot be nested inside a LEFT JOIN or a RIGHT JOIN. See the discussion of nesting in the INNER JOIN topic to see how to nest joins within other joins.
 
humm maybe not heh, found i could just simplify

Code:
ON (radio.refService = s.refService) AND (radio.refClient = c.refClient)

to

Code:
ON (radio.refService = s.refService)

well, anyway, it s working for now, dont worth to investigate anymore heh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top