Board index » delphi » how to locate the first record filtered by SELECT

how to locate the first record filtered by SELECT

like this:
SELECT * FROM mytable WHERE mycondition INTO :var1, :var2, ...;
when exist multiple rows, I always got a SQL error.
how to locate only the first one if exist multiple rows?
I use InterBase v5.1.

thanks

herman

 

Re:how to locate the first record filtered by SELECT


Don't use 'INTO', just open the dataset and get the first row values the
close.

Other Threads