SELECT TOP 1 * ; > FROM myDatabase!myTable ; > WHERE myTable.cod = pCod ; > AND myTable.price >=pPrice ; > into cursor crsPass1 ; >ORDER BY mytable.price > >SELECT TOP 1 * ; > FROM myDatabase!myTable ; > WHERE myTable.cod = pCod ; > AND myTable.price <=pPrice ; > into cursor crsPass2 ; >ORDER BY mytable.price DESC > >select * from ; > crsPass1 ; > UNION ; > select * from crsPass2 ; >INTO CURSOR curPriceCetin