i installed Sql server 2005 on my computer.
when i try to do some simple query from the sample database
(AdventureWorks), i realize that the table name is case sensitive..
select * from Production.product => Invalid object name
'Production.product'.
select * from Production.Product => rows returned...
is this true that the table names are case sensitive 'In a case sensitive database they are.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"zas" <yeezett@.gmail.com> wrote in message
news:1137553660.480416.239260@.z14g2000cwz.googlegroups.com...
>i installed Sql server 2005 on my computer.
> when i try to do some simple query from the sample database
> (AdventureWorks), i realize that the table name is case sensitive..
> select * from Production.product => Invalid object name
> 'Production.product'.
> select * from Production.Product => rows returned...
> is this true that the table names are case sensitive '
>|||u mean.. it's depend of the database ?
and.. i can set the database is case sensitive or not ?|||yes, CREATE DATABASE databaseName CollationName where the collation name is
a collcation with a sufix of CI, you can get a list of collations using
this query:
SELECT *
FROM ::fn_helpcollations()
For most American databases you should use SQL_Latin1_General_CP1_CI_AS
which is case insensitive.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"zas" <yeezett@.gmail.com> wrote in message
news:1137554119.669213.165690@.g43g2000cwa.googlegroups.com...
>u mean.. it's depend of the database ?
> and.. i can set the database is case sensitive or not ?
>|||declare @.lng varchar(500)
select @.lng =convert(sysname,Databasepropertyex(db_name(),'collation'))
print @.lng
select 'Server default collation' = description
from ::fn_helpcollations() C
where C.name = @.lng
Run this query for selected database in query anlyzer.
Regards
Amish|||thx you..
i got it now.. :)
Regards
zas
No comments:
Post a Comment