Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Special INNER JOIN clause required
Message
 
 
À
14/03/2009 13:16:33
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01387986
Message ID:
01388090
Vues:
38
I don't know enough about your data but it seems possible to me that different friends can refer to the same member and you did not include any column from the Friend table that identifies from which friend the rest of columns are coming..

>As a revised version, in order to collect fields from the joined table, I an now using this:
>
>
>SELECT DISINCT Member.FirstName ,Member.LastName,Friend.ModDate,Friend.Approve
>	FROM Member 
>	INNER JOIN Friend ON
>	(Friend.NoMember = Member.Numero AND Friend.NoMember2=1) OR 
>	(Friend.NoMember = 1 AND Friend.NoMember2=Member.Numero)
>WHERE Member.Numero<>1
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform