Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UNION SELECT... please correct me
Message
From
27/10/1998 11:51:54
 
 
To
27/10/1998 05:25:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00150818
Message ID:
00151067
Views:
22
>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

Try putting the INTO option after the first FROM; according to the VFP Help, that's the correct syntax.
Previous
Reply
Map
View

Click here to load this message in the networking platform