Results 1 to 1 of 1

Thread: Problem with SQL (JOINGING) - Continued

  1. #1
    Junior Member
    Join Date
    Sep 03
    Location
    BH
    Posts
    22

    Question Problem with SQL (JOINGING) - Continued

    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'!!!!
    Attached Images Attached Images  
    I'ts not so much where you stand in life, but in what direction you are moving

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •