Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UNION SELECT... please correct me
Message
De
27/10/1998 06:50:26
 
 
À
27/10/1998 05:25:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00150818
Message ID:
00150828
Vues:
14
Hi Denis,

You don't say what the error message is (please do so in subsequent notes, to Help us get to the bottom of things faster), But I would *guess* that your problem is that a UNION can only have TOP n AND ORDER BY in *one* SELECT. I believe it is the first one where they should be (but check the Help - I was too lazy this morning).

Good Luck,

Jim N

>Hi
>I want to receive 2 records from the table between which the variable is located.
>
>My code:
>SELECT TOP 1 * ;
>FROM myDatabase!myTable ;
> WHERE myTable.cod = pCod ;
> AND myTable.price >=pPrice ;
> UNION ;
> SELECT TOP 1 *;
> FROM myDatabase!myTable;
> WHERE myTable.cod = pCod ;
> AND myTable.price <=pPrice ;
>ORDER BY mytable.price ;
>INTO CURSOR curPrice
>
>I receive error message... What the problem ?... OR I do't use TOP 1 AND UNION ?
>Thanks for your messages.
>Denis.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform