Does the first query return any results? i noticed that you dont have a =,
IN, !=, OR having
before the subquery in getWaitingStudent, im no sql expert but does this
still work like this?

KOla

-----Original Message-----
From: David Clay [mailto:[EMAIL PROTECTED]]
Sent: 01 June 2001 14:58
To: CF-Talk
Subject: CFSET


Can anyone tell me why the #ClassID# in the UPDATE Query is always coming up
as a blank space, thus producing an error.

Code below:

 <CFQUERY name="getWaitingStudent" datasource="SMC">
 SELECT ClassSchedID, InputDate, WaitList, RegistrationID
 FROM ClassRegistration
 WHERE InputDate  (SELECT MIN(InputDate)
  FROM ClassRegistration
  WHERE ClassSchedID=99999)
 </CFQUERY>

 <CFSET ClassID=#getWaitingStudent.WaitList#>
 <CFSET RegID='#getWaitingStudent.RegistrationID#'>

 <CFQUERY name="InsertWaitingStudent" datasource="SMC">
  UPDATE ClassRegistration
  SET
   ClassSchedID=#ClassID#,
   WaitList=NULL,
   ModifiedDate=#Now()#
  WHERE RegistrationID='#RegID#'
 </CFQUERY>


Dave Clay
Internet Facilitator
Trus Joist, A Weyerhaeuser Business
5995 Greenwood Plaza Blvd, Suite 100
Greenwood Village, CO 80111
303.770.8506
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to