Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2008-11-24 : 11:27:21
|
Can someone tell me what is wrong with the following code? Only ????? gets inseretd in the table. drop table temptestDECLARE @SQL nvarchar(1000)DECLARE @rawvalue nvarchar(1000)SET @rawvalue= N'?????????????'CREATE TABLE [dbo].[temptest]( [test] [nvarchar](1000))SET @SQL='INSERT INTO temptest (test) VALUES ('''+@rawvalue+ ''')'EXEC(@SQL)--INSERT INTO #temptest (test) VALUES (@rawvalue)select * from temptest------------------------I think, therefore I am - Rene Descartes |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2008-11-24 : 11:28:57
|
SET @rawvalue= N'?????????????' -- the question marks here are actually Japaneese charcter set. Looks like the forum doesn't support them. ------------------------I think, therefore I am - Rene Descartes |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2008-11-24 : 11:46:09
|
Got it! Forgot to put N in the dynamic sql.------------------------I think, therefore I am - Rene Descartes |
 |
|
|
|
|