Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Red lines under third occurance of a table name Expand / Collapse
Author
Message
Posted Wednesday, July 10, 2013 9:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 9:51 AM
Points: 5, Visits: 12
Hello. I have an annoying problem and I can't find anything about it.

In scripts I have, that are templates created by my co-workers, the first occurance of a table name, ex: dbo.Exception_Ibank, is fine.

The third occurance has a red squiggly line under it as do all following occurances. If I move my mouse over the table name, it says that it can't find it. The script runs properly, though. Also, all of the field names of the columns in that table have red lines under them, too.

I've tried to clear the cache, which didn't do anything.

This isn't a performance issue. It's just annoying.

Any help would be greatly appreciated.

Bert


  Post Attachments 
7-10-2013 11-34-27 AM.bmp (12 views, 2.69 MB)
Post #1472209
Posted Wednesday, July 10, 2013 9:41 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:10 AM
Points: 2,792, Visits: 4,874
IntelliSense is not a strongest point of SSMS...
You will use to it.
BTW. SQL2012 adds more annoying features in to it eg. pinky UPDATE...


_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1472213
Posted Wednesday, July 10, 2013 10:18 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:30 PM
Points: 1,757, Visits: 2,577
I think SQL parses things a batch at a time. All your code is in the same batch, and the table is created in that batch. That might be why SQL doesn't recognize that the table exists in the later SELECT statement(s).

SQL DBA,SQL Server MVP('07, '08, '09)
I'm not fat, I'm gravity challenged.
Post #1472236
Posted Wednesday, July 10, 2013 10:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 9:51 AM
Points: 5, Visits: 12
You are correct! Thank you. I took out the create table statement and the following alter statement and all of the red lines went away.

It's no less annoying, but thank you for the answer.

Microsoft is so stupid sometimes.
Post #1472240
Posted Wednesday, July 10, 2013 11:57 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:30 PM
Points: 1,757, Visits: 2,577
You could also just add a "GO" after the ALTER TABLE; that will put the SELECTs in a separate batch, by which table SQL should "know" they already exist, having been created by a previous batch.

SQL DBA,SQL Server MVP('07, '08, '09)
I'm not fat, I'm gravity challenged.
Post #1472277
Posted Wednesday, July 10, 2013 12:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 9:51 AM
Points: 5, Visits: 12
I tried that. Nothing. I also added BEGINs and ENDs. Nothing.
Post #1472287
Posted Thursday, July 11, 2013 5:44 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:49 AM
Points: 739, Visits: 2,470
bert.hooks (7/10/2013)
You are correct! Thank you. I took out the create table statement and the following alter statement and all of the red lines went away.

It's no less annoying, but thank you for the answer.

Microsoft is so stupid sometimes.

Users are so stupid sometimes. Those objects do not currently exist, as the red lines indicate. The script runs fine, as expected, and a refresh of the intelli-sense cache should reflect the new table.




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1472518
Posted Thursday, July 11, 2013 6:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 9:51 AM
Points: 5, Visits: 12
Wow. Insults from an idiotic know-it-all.

As I indicated in my original post, the tables and column names do exist. I work with people who have used SQL for years and they get the red lines, too, even through the tables exist.

Ten Centuries was correct. You are not.
Post #1472526
Posted Thursday, July 11, 2013 6:13 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:49 AM
Points: 739, Visits: 2,470
bert.hooks (7/11/2013)
Wow. Insults from an idiotic know-it-all.

Pot --> kettle --> black.

Excuse me for being defensive, but Microsoft products have been putting food on my table since 1996. I don't think you should be calling them stupid because of your OCD being offended by squiggly red lines.




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1472533
Posted Thursday, July 11, 2013 6:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 9:51 AM
Points: 5, Visits: 12
I have my opinion and you have yours.

Have a great day.
Post #1472536
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse