Problem with SQL (JOINGING) i need help
Hi there ..
thank you for you worthy info...
but i have a problem...
would you please help me..
suppose you have three tables..
===
Students>
StCode, StName, SponsorCode
1 , John , 1
2 , Mery , 0 'Is not Sponsored
3 , Hary , 2
Sponsors>
SponsorCode, SponsorName, CityCode
1 , MS.MSN Co. , 1
2 , PABCO Co. , 2
Cities>
Citycode, CityName
1 , Alaska
2 , Lodon
==
and suppose you wanna view table in this way:
StName SponsorName CityName
John MS.MSN Co. Alaska
Mery
Hary PABCO London
=====
what's the solution?? how to write the join SQL correctly..
please i need your help
one helpfull guy sent this
[cuote]
IN ACCESS?
SELECT STUDENT.STNAME,
SPONSORS.SPONSORNAME,
CITY.CITYNAME
FROM (
STUDENT
LEFT JOIN SPONSORS ON
STUDENT.SponsorCode = SPONSORS.SponsorCode
)
LEFT JOIN
CITY ON
SPONSORS.Citycode = CITY.Citycode;
[/cuote]
but a message come to me saying:
'saytax error in JOIN operation'!!!!
![]()


Reply With Quote