Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL2000 Join Syntax
Message
 
 
À
06/09/2006 10:46:36
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 XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01151337
Message ID:
01151348
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
Try
SELECT * FROM table1 LEFT JOIN table2 ON table2.hydr_id = table1.hydr_id  ;
     WHERE table1.not_in_srv = 1
>Passing the query to SQL2000/SQL2005,
>
>Goal:
>
>1. I want to pull ALL of the records in table1 where not_in_srv = 1 regardless
>2. Include matching records in table2 IF any exist (some table1 records will have a matching record in table2 and some will not) the link is hydr_id in both tables
>
>SELECT * FROM table1 INNER JOIN table2 ON table2.hydr_id = table1.hydr_id  ;
>     WHERE (ISNULL(table1.not_in_srv,0) = 1)
>
>I keep getting strange results.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform