|
-
Aug 30th, 2004, 06:03 PM
#1
Thread Starter
Fanatic Member
SP and UNICODE
I have a stored procedure in my msSQL 2000 DBase... but every time it takes a string that has a character such as ., !, %, $, @, or anything like that it spits me out this error.
Line 1: Incorrect syntax near '.'.
Code:
CREATE PROCEDURE sp_getTableWhere
@vTable nvarchar(50),
@vcharValue1 nvarchar(50),
@vcharValue2 nvarchar(50)
AS
--Declaring variable to store our query
Declare @sql nvarchar(500)
SET @sql = 'SELECT * FROM ' + @vTable + ' WHERE ' + @vcharValue1 + ' = ' + '''' + @vcharValue2 + ''''
EXEC(@sql)
return
GO
I initialy thought it was my nvarchar, since I had it set to varchar before but it looks like it has nothing to do with that. I'm extremly confused as to why this is happening. I searched everywhere and found no answer.
If you could give me a hand, a link, an idea, anything... im depsperate. PLEASE!!!!!!!!
-Alek
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Aug 30th, 2004, 07:42 PM
#2
Thread Starter
Fanatic Member
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
|