Subject Re: [firebird-support] A question regarding the "rows" on select SQL statement.
Author Helen Borrie
At 03:00 AM 28/01/2004 +0000, you wrote:
>Previous we were using Borland Interbase. On those
>procedures/triggers, we have using "rows" on sql select statement
>such as...
>
>SELECT Mo, Opno FROM DyBdlClkTimeLog
> WHERE Logdate = NEW.Logdate
> AND EmpCompanyCode = NEW.EmpCompanyCode
> AND EmployeeCode = NEW.EmployeeCode
> AND SysAdjEndTime >= NEW.LostTimeEnd
> ORDER BY SysAdjEndTime ROWS 1
>(while the purpose is to select the first row of the record)
>
>But after come to the Firebird, this statement occur with the error...
>
>Invalid token.
>SQL error code = -104.
>Token unknown - line 31, char 32.
>ROWS.
>
>I'm wonder the "rows" doesn't work on firebird. Is that any method
>instead of "rows" in firebird? Or the name is different in firebird.
>Please kindly give me some ideas. Thank you very much!

SELECT FIRST 1 Mo, Opno FROM DyBdlClkTimeLog
WHERE Logdate = NEW.Logdate
AND EmpCompanyCode = NEW.EmpCompanyCode
AND EmployeeCode = NEW.EmployeeCode
AND SysAdjEndTime >= NEW.LostTimeEnd
ORDER BY SysAdjEndTime

The release notes have all the language enhancements.

/hb