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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 nvarchar

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2008-07-11 : 03:01:13
Can i anyone tell why i should go for Nvarchar (unicode character)
during dynamic sql query.since there is varchar data type.Can i know the Exact reason for this.



tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-11 : 03:03:28
You need to use it for sp_executesql. Check BOL for details.

But nvarchar data is for storing data that requires double bytes such as Chinese.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2008-07-11 : 03:13:06
txs for ur reply tkizer.
How to indentify how much bytes occupied for a nvarchar data type..

quote:
Origtkizerinally posted by tkizer

You need to use it for sp_executesql. Check BOL for details.

But nvarchar data is for storing data that requires double bytes such as Chinese.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-11 : 03:46:17
use DATALENGTH(nvarcharfield)
Go to Top of Page

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2008-07-11 : 05:12:37
Txs visakh16.i understood
quote:
Originally posted by visakh16

use DATALENGTH(nvarcharfield)

Go to Top of Page
   

- Advertisement -