Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5.0 & 6.0 - Nested SELECT's
Message
 
À
17/02/1999 12:11:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00188396
Message ID:
00188466
Vues:
18
My example with the combined WHERE clause has no UNION clause in it...

Mark

>Yes, I did and I got the "SELECT's are not union compatible" error message.
>
>>Did you try combining the WHERE, as in my other message?
>>
>>
>>SELECT * FROM CUSTOMER ;
>> WHERE MAXORDAMT > 50000 AND ALLT(COUNTRY) = 'USA'
>>

>>
>>Mark
>>
>>
>>>I try the UNION clause and I get an error:
>>>"SELECT's are not union compatible"
>>>
>>>
>>>>I think you need the UNION clause:
>>>>
>>>>
>>>>SELECT * FROM CUSTOMER ;
>>>> WHERE MAXORDAMT > 50000 UNION ;
>>>> (SELECT * FROM CUSTOMER WHERE ALLT(COUNTRY) = 'USA')
>>>>

>>>>
>>>>HTH!
>>>>Mark
>>>>
>>>>>These two lines run fine if I run one after the other.
>>>>>
>>>>>SELECT * FROM V1 WHERE MAXORDAMT > 50000
>>>>>
>>>>>SELECT * FROM CUSTOMER WHERE ALLT(COUNTRY) = 'USA'
>>>>>
>>>>>
>>>>>
>>>>>If I try to nest them, they don't run, what am I doing wrong?
>>>>>SELECT * FROM CUSTOMER ;
>>>>> WHERE MAXORDAMT > 50000 AND ;
>>>>> (SELECT * FROM CUSTOMER WHERE ALLT(COUNTRY) = 'USA')
>>>>>
>>>>>
>>>>>Thank you in advance
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform