I believe you should word your query as

SELECT MAX(ID) AS TheID FROM UserInfo

Scott Brader
Prairie Software Development LLC
101 East Sadd Street
PO Box 235
North Prairie, WI 53153-0235

Phone: 262.392.9173
Fax: 262.392.9174

Toll Free: 888.821.3427
Mobile: 262.490.1376

<http://www.prairiesoftdev.com>

Amateurs practice until they get it right,
Experts practice until they can't get it wrong.

-----Original Message-----
From: S R [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 12:28
To: CF-Talk
Subject: MAX function problem


Hello,

Everytime I use this function I have problems. My code is below. I keep
receiving an error saying:

"The column THEID is not present in the query named GETID"

<CFQUERY datasource="#dsn#" name="GetID">
SELECT MAX(ID) FROM UserInfo AS TheID
</CFQUERY>

<CFOUTPUT>#GetID.TheID#</CFOUTPUT>

thanks for your help,

Sal



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to