Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Sunday, March 25, 2012

Case sensitive of table name

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.googlegr oups.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.googlegr oups.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(),'coll ation'))
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

Case sensitive of table name

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_na
me(),'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

Case sensitive of table name

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

Friday, February 10, 2012

Can't uninstall previous version of AdventureWorks database

I want to install the new (February 2007) sample databases. The readme says any previous version must be removed by dropping the database., then running Remove from Add or Remove Programs. I've detached the database, but when I try to uninstall it I get the following message:

"Error 1309.Error reading from file: pathandfilename.mdf. Verify that the file exists and that you can access it."

What should I do.

Barry

It sounds like the uninstall is expecting the file to exisit and you much have deleted it? If you run a repair first it should replace the file then you can run an uninstall.

Thanks

Michelle

|||Both the AdventureWorksDB mdf and ldf files are there. All I've done is detached them first. I tried "Repair"ing the installation first. This ran successfully, but I still couldn't uninstall afterwards.|||Once you have detached the databases then it means that is uninstalled, try to reinstall by applying from the Feb.2007 update.|||Deleting the two database files (after detaching of course!), then running the Uninstall from Add/Remove programs worked!