tags:

views:

35

answers:

2

When I do

SELECT CHAR(193)

On my local database it returns Á, but when I do the same on a database running on another server it returns .

I expect Á as the correct value, how can I fix the function?

The databases were created individually, they aren't exactly the same.

+1  A: 

The collation is not the same, run this to see that you get different answers

SELECT CHAR(193) collate SQL_Latin1_General_Cp1256_CI_AS  
SELECT CHAR(193)
SELECT CHAR(193) Latin1_General_CI_AS

to find out the collation for the database run this

Select DATABASEPROPERTYEX(DB_name(),'Collation')
SQLMenace
Returned `?` and `┴` and `-`
BrunoLM
+4  A: 

Try using NChar instead of Char:

SELECT NCHAR(193)
Thomas
+1 So simple in the end!
Martin Smith
Pretty nice! Thank you!
BrunoLM