I would like to execute query:
select Column1 from table
and I get an error message:
Invalid column name 'Column1'.
If I write query like this:
select column1 from table
than it works.
It looks that server is case sensitive for columns and tables. How can I
change this?
Otherwise I have to rewrite all aplication.
Regards,SYou'll have to do an ALTER DATABASE to change the collation on the DB.
However, you'll have to change the collation on all character columns to get
the intended results.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"simonZ" <simon.zupan@.studio-moderna.com> wrote in message
news:ug1e6YWXGHA.3560@.TK2MSFTNGP04.phx.gbl...
I would like to execute query:
select Column1 from table
and I get an error message:
Invalid column name 'Column1'.
If I write query like this:
select column1 from table
than it works.
It looks that server is case sensitive for columns and tables. How can I
change this?
Otherwise I have to rewrite all aplication.
Regards,S|||I have already changed collation.
But I still have problems.
If I declare variable in my procedure, for example @.productID and than
somewhere in my procedure I use it, like: set @.productid=1
(not the same case for id), I get an error, because "id" should be "ID".
Any idea?
regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O2R$dgWXGHA.4248@.TK2MSFTNGP05.phx.gbl...
> You'll have to do an ALTER DATABASE to change the collation on the DB.
> However, you'll have to change the collation on all character columns to
> get
> the intended results.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:ug1e6YWXGHA.3560@.TK2MSFTNGP04.phx.gbl...
> I would like to execute query:
> select Column1 from table
> and I get an error message:
> Invalid column name 'Column1'.
> If I write query like this:
> select column1 from table
> than it works.
> It looks that server is case sensitive for columns and tables. How can I
> change this?
> Otherwise I have to rewrite all aplication.
> Regards,S
>|||How exactly did you change the collation? What commands did you use?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"simonZ" <simon.zupan@.studio-moderna.com> wrote in message
news:%23r197xWXGHA.4924@.TK2MSFTNGP05.phx.gbl...
I have already changed collation.
But I still have problems.
If I declare variable in my procedure, for example @.productID and than
somewhere in my procedure I use it, like: set @.productid=1
(not the same case for id), I get an error, because "id" should be "ID".
Any idea?
regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O2R$dgWXGHA.4248@.TK2MSFTNGP05.phx.gbl...
> You'll have to do an ALTER DATABASE to change the collation on the DB.
> However, you'll have to change the collation on all character columns to
> get
> the intended results.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:ug1e6YWXGHA.3560@.TK2MSFTNGP04.phx.gbl...
> I would like to execute query:
> select Column1 from table
> and I get an error message:
> Invalid column name 'Column1'.
> If I write query like this:
> select column1 from table
> than it works.
> It looks that server is case sensitive for columns and tables. How can I
> change this?
> Otherwise I have to rewrite all aplication.
> Regards,S
>|||I have changed collation:
ALTER DATABASE dbName COLLATE Slovenian_CI_AS
Queries now works:
select Column1 from table
or
select column1 from table
both works.
But if I declare variable in SP, like :
declare @.id int
and then set the value:
set @.ID=5
I get an error message, that I should declare variable @.ID.
This all is happening because Turkish has different letter for I or i.
But all my procedures are written case insensitive.
What should I do?
Regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ukR154XXGHA.1196@.TK2MSFTNGP03.phx.gbl...
> How exactly did you change the collation? What commands did you use?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:%23r197xWXGHA.4924@.TK2MSFTNGP05.phx.gbl...
> I have already changed collation.
> But I still have problems.
> If I declare variable in my procedure, for example @.productID and than
> somewhere in my procedure I use it, like: set @.productid=1
> (not the same case for id), I get an error, because "id" should be "ID".
> Any idea?
> regards,Simon
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:O2R$dgWXGHA.4248@.TK2MSFTNGP05.phx.gbl...
>
>|||Are you definitely inside the DB when you run the code or are you in master
or tempdb?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"simonZ" <simon.zupan@.studio-moderna.com> wrote in message
news:%23JU5v9fXGHA.4652@.TK2MSFTNGP04.phx.gbl...
I have changed collation:
ALTER DATABASE dbName COLLATE Slovenian_CI_AS
Queries now works:
select Column1 from table
or
select column1 from table
both works.
But if I declare variable in SP, like :
declare @.id int
and then set the value:
set @.ID=5
I get an error message, that I should declare variable @.ID.
This all is happening because Turkish has different letter for I or i.
But all my procedures are written case insensitive.
What should I do?
Regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ukR154XXGHA.1196@.TK2MSFTNGP03.phx.gbl...
> How exactly did you change the collation? What commands did you use?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:%23r197xWXGHA.4924@.TK2MSFTNGP05.phx.gbl...
> I have already changed collation.
> But I still have problems.
> If I declare variable in my procedure, for example @.productID and than
> somewhere in my procedure I use it, like: set @.productid=1
> (not the same case for id), I get an error, because "id" should be "ID".
> Any idea?
> regards,Simon
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:O2R$dgWXGHA.4248@.TK2MSFTNGP05.phx.gbl...
>
>|||I'm definitly inside the DB.
I go to database and click: create new stored procedure and then copy my
procedure from other server into this window and then check sintax failes
because of different letters.
Letter i is not the same as letter I on this server. On all other servers
everything works.
Any idea?
Regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23ckyr$hXGHA.3532@.TK2MSFTNGP05.phx.gbl...
> Are you definitely inside the DB when you run the code or are you in
> master
> or tempdb?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:%23JU5v9fXGHA.4652@.TK2MSFTNGP04.phx.gbl...
> I have changed collation:
> ALTER DATABASE dbName COLLATE Slovenian_CI_AS
> Queries now works:
> select Column1 from table
> or
> select column1 from table
> both works.
> But if I declare variable in SP, like :
> declare @.id int
> and then set the value:
> set @.ID=5
> I get an error message, that I should declare variable @.ID.
> This all is happening because Turkish has different letter for I or i.
> But all my procedures are written case insensitive.
> What should I do?
> Regards,Simon
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:ukR154XXGHA.1196@.TK2MSFTNGP03.phx.gbl...
>|||How about if you create the proc inside Query Analyzer? I don't trust
Enterprise Manager for most things.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"simonZ" <simon.zupan@.studio-moderna.com> wrote in message
news:O8Z9iFkXGHA.196@.TK2MSFTNGP04.phx.gbl...
I'm definitly inside the DB.
I go to database and click: create new stored procedure and then copy my
procedure from other server into this window and then check sintax failes
because of different letters.
Letter i is not the same as letter I on this server. On all other servers
everything works.
Any idea?
Regards,Simon
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23ckyr$hXGHA.3532@.TK2MSFTNGP05.phx.gbl...
> Are you definitely inside the DB when you run the code or are you in
> master
> or tempdb?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "simonZ" <simon.zupan@.studio-moderna.com> wrote in message
> news:%23JU5v9fXGHA.4652@.TK2MSFTNGP04.phx.gbl...
> I have changed collation:
> ALTER DATABASE dbName COLLATE Slovenian_CI_AS
> Queries now works:
> select Column1 from table
> or
> select column1 from table
> both works.
> But if I declare variable in SP, like :
> declare @.id int
> and then set the value:
> set @.ID=5
> I get an error message, that I should declare variable @.ID.
> This all is happening because Turkish has different letter for I or i.
> But all my procedures are written case insensitive.
> What should I do?
> Regards,Simon
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:ukR154XXGHA.1196@.TK2MSFTNGP03.phx.gbl...
>
No comments:
Post a Comment