SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Case sensitivity when declaring paramters


Case sensitivity when declaring paramters

Author
Message
Gil_Adi
Gil_Adi
SSC Veteran
SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)

Group: General Forum Members
Points: 255 Visits: 130
My server is case sensitive (CS)
My DataBase is no (CI)


The smss query editor works fine for this kind of query


CREATE TABLE [dbo].[Table_Test](
[col1] [int] NULL,
[Col2] [int] NULL
) ON [PRIMARY]

--- pay attention to columns names (col1,Col2)

Declare @col1value int

set @col1value = 15

insert table_test (Col1,col2) values (@col1value ,10)

-- This works although the table name and the columns name are in different case :-)

-- But when I am changing the Declare to Declare @Col1value int


it reports an error

Does the collation for the t-sql parameters defined by the server collation ? or it is defined in the T-SQL lanquege core



Gil_Adi
Gil_Adi
SSC Veteran
SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)SSC Veteran (255 reputation)

Group: General Forum Members
Points: 255 Visits: 130
well i have Installed Case Insensitive Instance on my machine

The paramter declareatiom is infulanced by the server collation

Case Insensitive Server Collation :

Declare @Col1 int
Set @col1 =16

works

on

Case sensitive Server Collation (DataBase Case Insensitive)

Declare @Col1 int
Set @col1 =16

Does not work


Conclusion

Paramters are sensitive only to the server collation



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search