Re: sql 2003 special characters



On 3 Aug, 22:55, Erland Sommarskog <esq...@xxxxxxxxxxxxx> wrote:
syd_p (sydneypue...@xxxxxxxxx) writes:
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
Just what I wanted to know - thanks.
The server and database codepage is 1252 BTW.
.



Relevant Pages

  • RE: collation SQL_EBCDIC037_CP1_CS_AS
    ... I am trying to connect to a SQL 2005 server using ODBC ... Subject: collation SQL_EBCDIC037_CP1_CS_AS ... Use of included script samples are subject to the terms specified at ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Must declare the scalar variable "@SiteId". SOLUTION...
    ... If you are using SQL 2005 that you've installed on another server, ... collation MUST be set to: ... or your installation will not work. ...
    (microsoft.public.sharepoint.portalserver)
  • Wss 3.0 SP1 install using SQL 2005: collation problem?
    ... but SharePoint complains about the collation. ... The SQL Server collation on SQL Server instance 'sqlserverX' is not ... Windows SharePoint Services requires a Latin1 General dictionary ...
    (microsoft.public.sharepoint.portalserver)
  • RE: Collation
    ... Select "SQL collations" at the collation selection dialog, ... for use with the CodePage 850 Character Set" (same sort ... Microsoft SQL Server Support ...
    (microsoft.public.sqlserver.server)
  • RE: Collation
    ... SQL 7.0 lets you indepently specify different values for the three ... server with totally inconsistent collation settings (for example, ... insensitive Unicode sorting). ... figure out what SQL 2000 setup settings you need to select to get a server ...
    (microsoft.public.sqlserver.server)