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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'First' is not a recognized function name

Status
Not open for further replies.

barathymathialagan

Programmer
Sep 22, 2003
2
CA
Hi

This is my sql code in asp

sSql1 = "SELECT First(clid) AS clid, clLoanNo FROM client whERE (((clRegion)='" & region &"') AND ((class)='Active' )) GROUP BY clLoanNo ORDER BY clLoanNo"
I got the following error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]'First' is not a recognized function name.

Any one can help me?

Thanks
Barathy
 
barathymathialagan,
AFAIK, no database has built-in function named First. What exactly do you want to do here?

Medic
 
jump to the first row (if there ARE more than one records exists) and then execute the SQL statement
may be the following will help you.

sSql1 = "SELECT clid, clLoanNo FROM client whERE (((clRegion)='" & region &"') AND ((class)='Active' )) GROUP BY clLoanNo ORDER BY clLoanNo"

objRS.MoveFirst
objComm.ActiveConnection = strConnection
objComm.CommandText = sSql1
objComm.CommandType = adCmdText
objComm.Execute

... other code

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top