Results 1 to 2 of 2

Thread: SP and UNICODE

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    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?

  2. #2

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    So it kinda works... man, this is messed up.

    When i do a query for the email address it does not find it.

    SELECT * FROM tblUser WHERE (charEmail = '[email protected]')

    This wont work with the SP search function i wrote either... why, oh whyyyyyyyyyyyyyyyyyyyyy
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width