Try:

<CFQUERY datasource="Contacts" name="GetNewUser">
SELECT MAX(ID) AS MAXID FROM ContactInfo 
</CFQUERY>

Thanks,
Jason Larson
"You think the Cubs have sore arms? What about the fans in left field?" 
 
 

-----Original Message-----
From: S R [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 13, 2002 3:08 PM
To: CF-Talk
Subject: MAX function problem

I keep getting an error resolving parameter MAXID when I do the
following

<CFQUERY datasource="Contacts" name="GetNewUser">
SELECT MAX(ID) FROM ContactInfo AS MAXID
</CFQUERY>

<CFSET UserID = #GetNewUser.MAXID#>

I've also tried

<CFSET UserID = '#GetNewUser.MAXID#'>
<CFSET UserID = '#MAXID#'>
<CFSET UserID = #MAXID#>

with the same error resulting.

Sal

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to