Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interbase equivalent of MSAccess First command

Status
Not open for further replies.

GregH99

Programmer
Dec 2, 2003
1
ZA
Hi All

I am passing an SQL string to the EasySoft Interbase ODBC driver (accessing an Interbase 6 DB) from a GIS package.

When passing an SQL string to an MS Access DB one can use the FIRST command to limit the rows returned to just the first row e.g.

SELECT DISTINCT [SPECIMENS].[CASNO], First([COLLECTORS].[SURNAME]) AS FirstOfSURNAME

I have been through the Interbase 6 documentation to see if I can find an equivalent but with no success. Any help would be appreciated.

Thanks
Greg
 
With IB 6.5 or higher, you can use the ROWS clause.

With IB 6, there's no such thing and you have to resort to using a stored procedure that does the SELECT for you and quits returning rows after "n" rows. Use Google for examples on this.

Martijn Tonies
Database Workbench - the developer tool for InterBase, Firebird, MySQL & MS SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top