Re: sql 2003 special characters
- From: syd_p <sydneypuente@xxxxxxxxx>
- Date: Tue, 4 Aug 2009 00:54:08 -0700 (PDT)
On 3 Aug, 22:55, Erland Sommarskog <esq...@xxxxxxxxxxxxx> wrote:
syd_p (sydneypue...@xxxxxxxxx) writes:Just what I wanted to know - thanks.
I am pulling back data from sqlserver 2003 with an application that
cannot cope with the french e acute for example.
I have taken this up with the vendors, and they have asked what
character set the sqlserver is using.
Can somebody tell me where the database character set is defined?
I dont have access to the database other than via a client and the db
admins dont seem to know the answer to the question (or maybe they are
just too busy!).
First, there is no SQL Server 2003. There is SQL 2000, SQL 2005 and SQL
2008.
In SQL Server you can set the collation on several levels: 1) server 2)
database 3) column and 4) expression.
The server and database collation mainly serves to set the default collation
for the lower levels.
To get the code page for the server collation:
select collationproperty(convert(nvarchar(200),
serverproperty('Collation')), 'CodePage')
To get the code page for the current database:
select collationproperty(convert(nvarchar(200),
databasepropertyex(db_name(), 'Collation')), 'CodePage')
For a specific column, you can use sp_help and then feed the
collation to collationproperty.
Keep in mind that it also matters if the colunm is varchar or
nvarchar. The code page only applies to varchar data.
--
Erland Sommarskog, SQL Server MVP, esq...@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008:http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005:http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
The server and database codepage is 1252 BTW.
.
- Follow-Ups:
- Re: sql 2003 special characters
- From: Erland Sommarskog
- Re: sql 2003 special characters
- References:
- sql 2003 special characters
- From: syd_p
- Re: sql 2003 special characters
- From: Erland Sommarskog
- sql 2003 special characters
- Prev by Date: Re: sql 2003 special characters
- Next by Date: How to set first Day of Week?
- Previous by thread: Re: sql 2003 special characters
- Next by thread: Re: sql 2003 special characters
- Index(es):
Relevant Pages
|