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
 What is the meaning of the N?

Author  Topic 

Javadeveloper
Starting Member

6 Posts

Posted - 2011-02-07 : 14:52:28
I don't count myself as a total newbie but I guess this is a newbie question : )

I found that I had to precede a path 'C:\.database\sqlserver\transfer.mdf' with N so that I got N'C:\.database\sqlserver\transfer.mdf' to get my CREATE DATABASE command to work. But what is the meaning of N? It is not the first time I see something like this but I have never really learnt what it is for. And are there other operators like the N? I have not found any documentation about it, someone may have a good link?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-07 : 14:54:23
It just means unicode.

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

Subscribe to my blog
Go to Top of Page

Javadeveloper
Starting Member

6 Posts

Posted - 2011-02-07 : 15:01:55
Aha ... I got an error message without it, could any character in 'C:\.database\sqlserver\transfer.ldf' be interpreted as an illegal character if they were interpreted as ISO 8859-1?

Thanks for your answer!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-07 : 15:05:26
The command likely requires unicode data, hence the need for N.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -