Hej. Jag har ett litet register med 50 stycken addresser, så fort jag försöker få ut något från tabellen CountryStates så kommer endast de addresser som har något i fältet stateId i tabellen distributors upp. Om jag skiter i att ta med tabellen CountryStates så får jag fram alla 50. Vad kan jag har gjort för fel i mina relationer, fält.
SELECT Distributors.DistId, Distributors.Countryname_ID, Distributors.Name, Distributors.Adress1, Distributors.Adress2,
Distributors.StateId, Distributors.Zip, Distributors.City, CountryName.CountryName_ID, CountryName.CountryName_GB,
CountryName.CountryCode, CountryStates.StateId, CountryStates.StateName, CountryStates.StateCode FROM Distributors INNER JOIN CountryName ON Distributors.Countryname_ID = CountryName.CountryName_ID INNER JOIN
CountryStates ON Distributors.StateId = CountryStates.StateId AND
CountryName.CountryName_ID = CountryStates.CountryName_ID
------------------
Real mad hiphop flavaz kickin' it right from tha street without no FEAR, Yo !
[Redigerat av erka den 11 jan 2002]