Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Analogto
Starting Member
5 Posts |
Posted - 2008-12-23 : 05:06:05
|
| --This is my codeCreate proc _TempasDeclare @IN intSet @in=1Select @in-- when I Run this T-SQL , it show Error message in thisMsg 137, Level 15, State 1, Procedure _Temp, Line 4Must declare the scalar variable "@in".Msg 137, Level 15, State 2, Procedure _Temp, Line 5Must declare the scalar variable "@in".--Please help me solve this problem |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2008-12-23 : 06:09:32
|
| The syntax looks ok. How and where are you running it ? |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-12-23 : 07:21:10
|
This behaviour depends on adjustment at installation of sql server.But I'm sorry, I don't know if it is possible to change it after completed installation.And it is not a collation-problem!Webfred No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Analogto
Starting Member
5 Posts |
Posted - 2008-12-23 : 21:49:40
|
| Yes, Webfred true with myseft.With same code, I running at Other Server at Ohter computer is OK.At Other Server ,Server Properties Collation is :: "SQL_Latin1_General_CP1_CI_AS"And My Server is too. I don't know that reason (Colation Properties ) influence my code.Please Help Me ! Thanhk You ... |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2008-12-24 : 07:08:45
|
Just a wild guess,Can you try this...--This is my codeCreate proc _TempasDeclare @in intSet @in=1Select @in |
 |
|
|
Analogto
Starting Member
5 Posts |
Posted - 2008-12-24 : 07:54:11
|
| Problem At keyword ( @IN and @in )If i use same Case Sensitive , my Server can recognize but I Declare @IN (Case Sensitive ) and Use @in (Non Case-Sensitive) This code Error While Other Server no problem. !!!Whose encounter this Situation ?. Help me |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2008-12-24 : 08:56:16
|
quote: Originally posted by Analogto Problem At keyword ( @IN and @in )If i use same Case Sensitive , my Server can recognize but I Declare @IN (Case Sensitive ) and Use @in (Non Case-Sensitive) This code Error While Other Server no problem. !!!Whose encounter this Situation ?. Help me
Its a case of collation that you have set at the time of installation.You might want to check this ,SELECT DATABASEPROPERTYEX('<database name>', 'Collation')You can force it not to be sensitive with something like this and then run your sp, then again make sure how it impacts other processes :ALTER TABLE yourtable ALTER COLUMN yourcolumn VARCHAR(length) COLLATE SQL_Latin1_General_CP1_CI_AS |
 |
|
|
|
|
|
|
|