Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using 2 fields in SQL Sub-Query Problem
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
01044768
Message ID:
01044777
Vues:
15
>>What is the correct to concatenate 2 character fields in a sub-query for SQL Server? I have tried the plus sign, a comma and the double-pipes (Oracle equivalent). TIA!
>>SELECT * FROM SQLTable WHERE
>>   CField1, cField2 IN
>>   (select CField1, cField2 from SQLTable2
>>    WHERE...)
>
>
>SELECT st1.* FROM SQLTable st1
>  JOIN SQLTable2 st2
>    ON st1.CField1 = st2.CField1
>      AND st1.CField2 = st2.CField2
>      AND  <WHERE clause for st2 here>
Even better. I did not realize SQL Server allowed that type (JOIN) of syntax.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform