hi, i am having problems working out how to execute a nested query in a cfquery.

It works fine in mysql with the following sql statement:

SELECT staffTitle,staffFirstName,staffLastName FROM STAFF WHERE staffEmail = 
(SELECT staffEmail FROM STUDENTS WHERE studentEmail = email);

however, i am not sure how to convert this into a cfquery. i have tried the 
following but getting an error:

SELECT staffTitle, staffFirstName, staffLastName FROM STAFF WHERE staffEmail = 
SELECT staffEmail FROM STUDENTS WHERE studentEmail = <cfqueryparam 
value="[EMAIL PROTECTED]" cfsqltype="cf_sql_varchar">

i would appreciate some help on what i am doing wrong

thanks very much

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257981
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to