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 |
cognos79
Posting Yak Master
241 Posts |
Posted - 2008-02-26 : 10:50:19
|
why do sometimes we have to use N' before the query. what does adding N' do. e.g.exec sp_executesql N'select cast('+@c2field+' as float) from contact2 where userdef12='+''''+cast(@contractnumber as varchar(6))+'''and isnumeric(' +@c2field+')=1',N'@existingamount float output',@existingamount output |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-26 : 10:51:20
|
N' denotes that you are providing unicode string literal.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
cognos79
Posting Yak Master
241 Posts |
Posted - 2008-02-26 : 10:52:11
|
could you please elaborate more... |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-02-26 : 11:19:01
|
unicode saves chars in 2 bytes rather than in one and so enables you to save chinese, japanese, etc.. characthers._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
cognos79
Posting Yak Master
241 Posts |
Posted - 2008-02-26 : 11:25:07
|
thanks guys... |
 |
|
|
|
|