Thursday, February 9, 2012

about collation

i need seach data in two database,and need join
the table between them,but the two database'collation
is not same,how can i join them?
if i must change one database's collation,
can i change the whole database's collation of exist
data,or i must alter table one by one?
thanksYou don't have to modify the database's collation. Instead use the
collate clause. Check out this example:
SELECT Col1, Col2
FROM Table1 INNER JOIN Table2 ON Table1.ColA = Table2.Colb COLLATE
SQL_Latin1_General_CP1_CI_AS
You can also use the COLLATE clause in the WHERE Clause.
Adi
"frank" <anonymous@.discussions.microsoft.com> wrote in message
news:073801c3b09d$edede210$a101280a@.phx.gbl...
> i need seach data in two database,and need join
> the table between them,but the two database'collation
> is not same,how can i join them?
> if i must change one database's collation,
> can i change the whole database's collation of exist
> data,or i must alter table one by one?
> thanks
>

No comments:

Post a Comment