dbTalk Databases Forums  

SSMS 2008 doesn't recognize variables starting with 2 @ signs

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss SSMS 2008 doesn't recognize variables starting with 2 @ signs in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Morse
 
Posts: n/a

Default SSMS 2008 doesn't recognize variables starting with 2 @ signs - 12-15-2009 , 01:14 PM






The intellisense feature in SSMS 2008 is great but alot of my old stored
procedure code uses local variables that start with 2 @ signs, e.g. @@index,
etc. This is valid syntax for the variables but SSMS 2008 highlights these as
errors. Is there any way to configure SSMS 2008 to recognize these?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SSMS 2008 doesn't recognize variables starting with 2 @ signs - 12-15-2009 , 04:38 PM






David Morse (David Morse (AT) discussions (DOT) microsoft.com) writes:
Quote:
The intellisense feature in SSMS 2008 is great but alot of my old stored
procedure code uses local variables that start with 2 @ signs, e.g.
@@index, etc. This is valid syntax for the variables but SSMS 2008
highlights these as errors. Is there any way to configure SSMS 2008 to
recognize these?
No, it may be a known issue. I tested in various versions I have
available, and in the November CTP version of SQL 2008 R2 I don't
get red squiggles for names starting with @@. So if you are really
desperate, you could download the CTP and install SSMS from it. But
beware that installing beta software on your regular machine may cause
problems further ahead.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #3  
Old   
Aaron Bertrand
 
Posts: n/a

Default Re: SSMS 2008 doesn't recognize variables starting with 2 @ signs - 12-15-2009 , 08:02 PM



This doesn't happen for me. What version of SSMS are you using? Have you
applied service pack 1 to your workstation?




On 12/15/09 2:14 PM, in article
883541F0-44B0-4EF3-8801-10D90D85A258...soft (DOT) com, "David Morse" <David
Morse (AT) discussions (DOT) microsoft.com> wrote:

Quote:
The intellisense feature in SSMS 2008 is great but alot of my old stored
procedure code uses local variables that start with 2 @ signs, e.g. @@index,
etc. This is valid syntax for the variables but SSMS 2008 highlights these as
errors. Is there any way to configure SSMS 2008 to recognize these?

Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SSMS 2008 doesn't recognize variables starting with 2 @ signs - 12-16-2009 , 04:49 PM



Aaron Bertrand (moc.liamg (AT) dnartreb (DOT) noraa) writes:
Quote:
This doesn't happen for me. What version of SSMS are you using? Have you
applied service pack 1 to your workstation?
I get red squiggles for

declare @@spig int

in SSMS 2008, but not SSMS 2008 R2.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #5  
Old   
Aaron Bertrand
 
Posts: n/a

Default Re: SSMS 2008 doesn't recognize variables starting with 2 @ signs - 12-20-2009 , 10:42 PM



You're right, I think I tried to validate on a machine with the latest CTP,
not 2008 proper.



On 12/16/09 5:49 PM, in article Xns9CE3F273A381BYazorman (AT) 127 (DOT) 0.0.1, "Erland
Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote:

Quote:
Aaron Bertrand (moc.liamg (AT) dnartreb (DOT) noraa) writes:
This doesn't happen for me. What version of SSMS are you using? Have you
applied service pack 1 to your workstation?

I get red squiggles for

declare @@spig int

in SSMS 2008, but not SSMS 2008 R2.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.