Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One of the other two INNER JOIN
Message
 
 
À
23/04/2015 08:37:52
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01619007
Message ID:
01619025
Vues:
33
It doesn't look like you need any JOIN at all because you are not using columns from joined tables. WHERE (EXISTS ... should be enough

>In a query, I have two INNER JOIN. Either one of the two as a match to fit in the result.
>
>For example, I may have this:
>
>
>SELECT Client.Numero
> FROM Client
> INNER JOIN Invoice ON Invoice.Numero=Client.NoInvoice AND Invoice.SecondCondition=True
> INNER JOIN Inventory ON Inventory.Numero=Client.NoInventory AND Inventory.SecondCondition=True
>
>
>As is, this will return no record.
>
>If I use LEFT JOIN on both tables, this will return all the records.
>
>I basically need a INNER JOIN on one or the other.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform