The problem is that your As TheID needs to appear immediately after Max(ID)
like so:
SELECT MAX(ID) AS TheID FROM UserInfo 

The way you have it actually is renaming the table not the result.

-----Original Message-----
From: S R [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 10:28 AM
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



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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