|
-
April 6th, 2003, 02:07 AM
#1
Need Help~SQL string within a SQL string problem
Hi
I am writing a stored procedure in Microsoft SQL server 2000 as shown below:
DECLARE @sql nvarchar(1000)
SET @sql = 'SELECT * FROM myTable WHERE name LIKE ' + '%[%]'
EXEC sp_executesql @sql
The SQL analyser gave me the error
" Invalid column name '%[%]' ". I think there is something to do with the string quote but i am not sure how to put another string quote within that line of statement. Please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|