Elam, Debbie
DElam at jenkens.com
Thu Nov 30 13:23:00 CST 2006
Use single quotes around test. Double quotes will cause problems. Debbie -----Original Message----- From: Mark A Matte [mailto:markamatte at hotmail.com] Sent: Thursday, November 30, 2006 1:14 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL in SP failing Hello All, Any idea why the following SQL will fail in an SP? 'insert into tblBrita_ID(case_id,Criteria) SELECT case_id, "test" As Criteria FROM tblCase where case_id=1' The error is "Invalid column name 'test'." It doesn't always fail...normally 'test' is a parameter passed to the SP...I have modified it to the above for demo purposes...but using just the word 'test' as above still gives the same error. Thanks, Mark A. Matte _________________________________________________________________ Get the latest Windows Live Messenger 8.1 Beta version. Join now. http://ideas.live.com - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions.