COLLATE Latin1_General_CI 
Author Message
 COLLATE Latin1_General_CI
Hello,

When generating a sql script I see "COLLATE Latin1_General_CI"... is this
the database default?

Is it good to use this?

Thanks!



Fri, 17 Feb 2006 18:25:52 GMT
 COLLATE Latin1_General_CI

Hi Arjen,

You can't see COLLATE Latin1_General_CI as a collation, it is either COLLATE
Latin1_General_CI_AI or COLLATE Latin1_General_CI_AS.

It is not the database default it is the actual collation of the column
(although the actual collation can be the same as the database default
ofcourse) if you want to know the database default collation you can use
SELECT DATABASEPROPERTYEX(<db name>, 'Collation')

Whether or not a specific collation is good to use depends on your
requirements.


Quote:
> Hello,

> When generating a sql script I see "COLLATE Latin1_General_CI"... is this
> the database default?

> Is it good to use this?

> Thanks!



Fri, 17 Feb 2006 21:59:42 GMT
 COLLATE Latin1_General_CI
hi Arjen,


Quote:
> When generating a sql script I see "COLLATE Latin1_General_CI"... is this
> the database default?

as long as not differetly specified at the column creation time,  char,
varchar, nchar, and so on, columns inherit the database collation specified
at database creation time.

Quote:
> Is it good to use this?

I'm sorry, please excuse my poor english....this depends on what you mean by
that....
if you are asking if this type of collaction is right, this depend on your
needs about sort order and specific collation rules....
if you are asking if it is corect to directly specify the collation rules in
the sql script, then yes, it is correct to do il, as it is correct specify
it like
SELECT *
FROM Test
WHERE [column] COLLATE Latin1_General_CS_AI = 'piPPo'
in order to get a result where case are ginored like
Where Lower([column])=Lower('piPPo')

hth and please excuse my poor english
Andrea Montanari


http://www.asql.biz/DbaMgr.shtm
DbaMgr2k ver 0.4.0  -  DbaMgr ver 0.50.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply



Fri, 17 Feb 2006 22:13:22 GMT
 COLLATE Latin1_General_CI
All right... your English is good enough to understand.

Thanks.



Quote:
> hi Arjen,


> > When generating a sql script I see "COLLATE Latin1_General_CI"... is
this
> > the database default?

> as long as not differetly specified at the column creation time,  char,
> varchar, nchar, and so on, columns inherit the database collation
specified
> at database creation time.

> > Is it good to use this?
> I'm sorry, please excuse my poor english....this depends on what you mean
by
> that....
> if you are asking if this type of collaction is right, this depend on your
> needs about sort order and specific collation rules....
> if you are asking if it is corect to directly specify the collation rules
in
> the sql script, then yes, it is correct to do il, as it is correct specify
> it like
> SELECT *
> FROM Test
> WHERE [column] COLLATE Latin1_General_CS_AI = 'piPPo'
> in order to get a result where case are ginored like
> Where Lower([column])=Lower('piPPo')

> hth and please excuse my poor english
> Andrea Montanari


> http://www.asql.biz/DbaMgr.shtm
> DbaMgr2k ver 0.4.0  -  DbaMgr ver 0.50.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> --------- remove DMO to reply



Fri, 17 Feb 2006 23:03:21 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Sql 2000 - Import tables - Incorrect syntax near COLLATE

2. URGENT: SQL7 - Use of COLLATE

3. DTSrun Error - Collate

4. Invalid Syntax near "Collate"

5. Incorrect syntax near 'COLLATE'

6. Comparing text in WHERE using COLLATE

7. ERROR while usin COLLATE key word????

8. Incorrect Syntax Near COLLATE

9. Which is more efficient: UPPER/LOWER or COLLATE with a case sensitive database

10. Collate woes.

11. Check Constraint with Collate

12. COLLATE Japanese / Japanese_Unicode


 
Powered by phpBB® Forum Software