General information
Category:
Coding, syntax & commands
Title:
UNION SELECT... please correct me
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only