Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select records if field in 2nd table is in a list of val
Message
De
23/07/2007 22:05:04
 
 
À
23/07/2007 21:51:05
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 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01242994
Message ID:
01243062
Vues:
32
Thanks Kevin, that looks awful familiar - I think Boris wrote a similar example. Sheesh, ever have one of those days? :o)



>You need the alias OUTSIDE the parenthesis for the derived table. The 'tbl1' inside the derived table won't help outside the parenthesis. Try this...
>
>
>SELECT * FROM table1 AS tw INNER JOIN
> (SELECT table2.inci_id FROM table2  WHERE  table2.inci_id = '07000244      '
> or table2.inci_Id = '2007093878    '
> or table2.parent_id = '07000244      '
> or (LEN(table2.parent_id)>0 AND table2.parent_id = '2007093878    ')) tbl1
> ON tw.inci_id = Tbl1.inci_id ORDER BY tw.inci_id, tw.vehnum
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform