ID is varchar.. It goes to IF and gives error on DETAILFIELD1. Just make simple query with alias of more than 10 chars and test.
-----Original Message----- From: Randell B Adkins [mailto:[EMAIL PROTECTED]] Sent: 03 December 2002 15:49 To: CF-Talk Subject: Re: Shall I start Pulling my Hair First check to see if the field ID is a numeric or TEXT field. if it is Numeric then the WHERE line should be: WHERE ID = 12 not '12' Single Quotes are not used in numeric fields. Then I would also change the output line to read: <CFIF myQuery.recordcount gt 0> <cfoutput>#myQuery.Detailfield1# <cfelse> NO RECORDS </CFIF> >>> [EMAIL PROTECTED] 12/03/02 10:23AM >>> Whats wrong with this simple code <CFQuery Name="myQuery" Datasource="Test"> Select J_Sname.AccountNumber AS DetailField1 From J_Sname Where ID = '12' </CFQuery> <CFOutput> #myQuery.DetailField1# </CFOutput> It gives error 'Element DETAILFIELD1 is undefined in myQuery. ' But if I use DETAILFIE1 (or anyother letter not more than 10 characters) instead of DETAILFIELD1 it works. As I pop in 11th character for my alias it gives error. Is there any limit of characters in AS inside query in CFMX????? Application Server: Coldfusion MX DB: SQLServer 2000 Shahzad Butt (Development Engineer) JJ FastFood Distribution Ltd. Office: +44 (0) 1992 701 722 Mobile: +44 (0) 7803 584 873 Fax: +44 (0) 1992 701 604 7 Solar Way, Innova Park, Enfield, London, EN3 7XY ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

