Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Problem
Message
 
 
À
04/02/2011 14:31:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01498808
Message ID:
01498826
Vues:
48
You are welcome

>Thank you, Sergey. Both worked and both are clever.
>
>>Try
>>SELECT t1.* FROM mytable t1
>>  WHERE 2 = (SELECT COUNT(*) FROM mytable t2 WHERE t2.Artnum = t1.Artnum AND t2.Catnum IN ( 'INT', 'ISR'))
>>
>>
>>
>>
>>>
>>>Consider the following table:
>>>
>>>
>>>Artnum    Catnum
>>>111         INT
>>>111         ISR
>>>111         GRP
>>>222         INT
>>>222         RSA
>>>222         GRP
>>>
>>>
>>>I want a select statement that says 'give me all the records for a particular artnum WHERE the artnum belongs to a catnum of BOTH 'INT' and 'ISR'.
>>>
>>>This would produce the following list:
>>>
>>>
>>>111         INT
>>>111         ISR
>>>111         GRP
>>>
>>>
>>>Thanks,
>>>
>>>Yossi
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform