Hi,
I have read some articles on Unicode characters, I understand that they use
as a "big international code page" that host thousands of characters. The
thing I don't understand is why I get an error when I compare two nvarchar
column having a different collation... as this:
I know that COLLATE in the comparison would correct the issue, but I want to
find a way to avoid hard coding COLLATE keywords and avoid to change both
collations of the fields. I though nvarchar was to resolve this. Someone can
explain why it doesn't do that?
Or please leave me a personnal mail or web link... Thanks
CREATE TABLE a
(
LatinAS nvarchar(50) COLLATE Latin1_General_CI_AS,
LatinAI nvarchar(50) COLLATE Latin1_General_CI_AI
)
GO
INSERT INTO a (LatinAS, LatinAI) VALUES ('Eric', 'Eric')
SELECT * FROM a WHERE LatinAS = LatinAI
Server: Msg 446, Level 16, State 9, Line 1
Cannot resolve collation conflict for equal to operation.
david.parenteau@.compuware.com
TIANVARCHAR allows you to use Unicode characters. There are still differences
in character sets when you move from collation to collation. So, your
options here are pretty limited.
"David Parenteau" <DavidParenteau@.discussions.microsoft.com> wrote in
message news:5031A14F-4D36-47B8-A07F-3ABB5BF019D2@.microsoft.com...
> Hi,
> I have read some articles on Unicode characters, I understand that they
> use
> as a "big international code page" that host thousands of characters. The
> thing I don't understand is why I get an error when I compare two nvarchar
> column having a different collation... as this:
> I know that COLLATE in the comparison would correct the issue, but I want
> to
> find a way to avoid hard coding COLLATE keywords and avoid to change both
> collations of the fields. I though nvarchar was to resolve this. Someone
> can
> explain why it doesn't do that?
> Or please leave me a personnal mail or web link... Thanks
>
> CREATE TABLE a
> (
> LatinAS nvarchar(50) COLLATE Latin1_General_CI_AS,
> LatinAI nvarchar(50) COLLATE Latin1_General_CI_AI
> )
> GO
> INSERT INTO a (LatinAS, LatinAI) VALUES ('Eric', 'Eric')
> SELECT * FROM a WHERE LatinAS = LatinAI
>
> Server: Msg 446, Level 16, State 9, Line 1
> Cannot resolve collation conflict for equal to operation.
>
> david.parenteau@.compuware.com
> TIA|||David
CREATE TABLE b
(
LatinAS nvarchar(50) COLLATE Latin1_General_CI_AS,
LatinAI nvarchar(50) COLLATE Latin1_General_CI_AI
)
GO
INSERT INTO b (LatinAS, LatinAI) VALUES ('Eric', 'Eric')
SELECT * FROM b WHERE LatinAS COLLATE Latin1_General_CI_AI = LatinAI
"David Parenteau" <DavidParenteau@.discussions.microsoft.com> wrote in
message news:5031A14F-4D36-47B8-A07F-3ABB5BF019D2@.microsoft.com...
> Hi,
> I have read some articles on Unicode characters, I understand that they
> use
> as a "big international code page" that host thousands of characters. The
> thing I don't understand is why I get an error when I compare two nvarchar
> column having a different collation... as this:
> I know that COLLATE in the comparison would correct the issue, but I want
> to
> find a way to avoid hard coding COLLATE keywords and avoid to change both
> collations of the fields. I though nvarchar was to resolve this. Someone
> can
> explain why it doesn't do that?
> Or please leave me a personnal mail or web link... Thanks
>
> CREATE TABLE a
> (
> LatinAS nvarchar(50) COLLATE Latin1_General_CI_AS,
> LatinAI nvarchar(50) COLLATE Latin1_General_CI_AI
> )
> GO
> INSERT INTO a (LatinAS, LatinAI) VALUES ('Eric', 'Eric')
> SELECT * FROM a WHERE LatinAS = LatinAI
>
> Server: Msg 446, Level 16, State 9, Line 1
> Cannot resolve collation conflict for equal to operation.
>
> david.parenteau@.compuware.com
> TIA|||If nvarchar keep the same characters bytes for every characters in a
collation A, does the same character in collation B will be the same bytes
values?
Collation A
Characters A correspond to 265 for example.
In Collation B, does the character A will have the same bits and be 265 or
it could be something else?
Does the sort order and other things (except code page) in collations differ
also for nvarchar columns?
David
"Aaron Bertrand [SQL Server MVP]" wrote:
> NVARCHAR allows you to use Unicode characters. There are still difference
s
> in character sets when you move from collation to collation. So, your
> options here are pretty limited.
>
>
> "David Parenteau" <DavidParenteau@.discussions.microsoft.com> wrote in
> message news:5031A14F-4D36-47B8-A07F-3ABB5BF019D2@.microsoft.com...
>
>
Showing posts with label international. Show all posts
Showing posts with label international. Show all posts
Friday, March 30, 2012
Wednesday, March 28, 2012
Numeric format - International settings
Hey,
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jacJac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
>
>
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jacJac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
>
>
Numeric format - International settings
Hey,
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jacJac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
> >Hey,
> >
> >I have following problem :
> >When is make a query in the enterprice manager I receive all numbers in an
> >european way (decimal = , no thousand separator is shown ex 1000,52).
> >
> >When I make the same query in the query analyser i receive the output as
> >follows 1000.5200
> >I want it in an european format : 1000,52.
> >
> >Is there a way to declare this in the query (like you can do with the
> >datatimes : set dateformat dmy).
> >
> >I have the same problem when I export the data via a DTS. Can I not say to
> >him that he have to export numbers in a european format?
> >
> >Thanks in advance
> >jac
> >
> >
>
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jacJac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
> >Hey,
> >
> >I have following problem :
> >When is make a query in the enterprice manager I receive all numbers in an
> >european way (decimal = , no thousand separator is shown ex 1000,52).
> >
> >When I make the same query in the query analyser i receive the output as
> >follows 1000.5200
> >I want it in an european format : 1000,52.
> >
> >Is there a way to declare this in the query (like you can do with the
> >datatimes : set dateformat dmy).
> >
> >I have the same problem when I export the data via a DTS. Can I not say to
> >him that he have to export numbers in a european format?
> >
> >Thanks in advance
> >jac
> >
> >
>
Numeric format - International settings
Hey,
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jac
Jac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>
|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
>
sql
I have following problem :
When is make a query in the enterprice manager I receive all numbers in an
european way (decimal = , no thousand separator is shown ex 1000,52).
When I make the same query in the query analyser i receive the output as
follows 1000.5200
I want it in an european format : 1000,52.
Is there a way to declare this in the query (like you can do with the
datatimes : set dateformat dmy).
I have the same problem when I export the data via a DTS. Can I not say to
him that he have to export numbers in a european format?
Thanks in advance
jac
Jac,
Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
regional options when displaying currency, numbers, dates, and times."
The display in Query Analyzer will then conform to the Control Panel
settings for Regional display options.
Steve Kass
Drew University
jac wrote:
>Hey,
>I have following problem :
>When is make a query in the enterprice manager I receive all numbers in an
>european way (decimal = , no thousand separator is shown ex 1000,52).
>When I make the same query in the query analyser i receive the output as
>follows 1000.5200
>I want it in an european format : 1000,52.
>Is there a way to declare this in the query (like you can do with the
>datatimes : set dateformat dmy).
>I have the same problem when I export the data via a DTS. Can I not say to
>him that he have to export numbers in a european format?
>Thanks in advance
>jac
>
|||Thanks Steve.
But how I say to my DTS (makes a query select * from XXX and export it in a
textfile) that he has to use the regional settings?
Thanks
"Steve Kass" wrote:
> Jac,
> Try the Query Analyzer setting Tools|Options|Connections Tab|"Use
> regional options when displaying currency, numbers, dates, and times."
> The display in Query Analyzer will then conform to the Control Panel
> settings for Regional display options.
> Steve Kass
> Drew University
> jac wrote:
>
sql
Subscribe to:
Posts (Atom)