try rewriting the page being included, to generate a variable that holds the SQL Statement, including the page BEFORE your CFQUERY, and then putting the variable name inside the CFQUERY tags, surrounded by preservesinglequotes(). ~Simon > Simon Horwith > Certified ColdFusion Developer > Fig Leaf Software > 1400 16th St NW, # 220 > Washington DC 20036 > 202.797.6570 (direct line) > www.figleaf.com > -----Original Message----- From: Michael She [mailto:[EMAIL PROTECTED]] Sent: Friday, November 17, 2000 8:28 AM To: CF-Talk Subject: CFincludes and SQL Queries <-SIMPLE QUESTION! If I embed a SQL query inside a CFQUERY my variables don't get processed: <cfquery name="UserDupeCheck" datasource="#Application.Datasource#" dbtype="ODBC"> <cfinclude template="/Includes/SQL/Registration/SelectUserDupeCheck.cfm"> </cfquery> The query is: Select Username From Users Where Username = '#form.username#' Am I doing something wrong, or is this normal for CF not to process CFincludes inside CFqueries? -- Michael She I m a g i n e C o m m u n i c a t i o n s Company E-mail: [EMAIL PROTECTED] Personal E-mail: [EMAIL PROTECTED] ICQ UIN: #243466 Personal Homepage: http://www.michaelshe.com (Under Construction) Imagine Communications: http://www.imagineer.net PGP Fingerprint: 9A24 1DA9 39B8 0A0C C5ED 6E5D 45E9 075A 51CD 66A1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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