Red Gate forums :: View topic - Invalid Objects when using Temp Tables
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5 EAP
SQL Prompt 5 EAP forum

Invalid Objects when using Temp Tables

Search in SQL Prompt 5 EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
sdyckes



Joined: 01 Oct 2010
Posts: 3
Location: Charlotte NC

PostPosted: Mon Oct 04, 2010 2:50 pm    Post subject: Invalid Objects when using Temp Tables Reply with quote

When using temp tables, the red squiggly underlines appear under the Temp table and all columns referencing the temp table. The message that appears when you hover on the object is "invalid Column Name" or "invalid Object Name".
If I use the format SQL, it will then validate and clear the "errors", and all the angry red squiggles disappear.

It does recognize the temp table name and its columns in the intellisense portion as I am writing the script. It does not cause any errors or problems that I am aware of.
Back to top
View user's profile Send private message
Paul Stephenson



Joined: 23 Jul 2010
Posts: 107
Location: Cambridge, UK

PostPosted: Mon Oct 04, 2010 3:44 pm    Post subject: Reply with quote

Hello sdyckes,

I've not been able to reproduce your problem -- would you be able to post a sample script?

It would also be useful to know which versions of Windows, SSMS and SQL Prompt you are using.

Thanks for your feedback,
Paul Stephenson
SQL Prompt Project Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
sdyckes



Joined: 01 Oct 2010
Posts: 3
Location: Charlotte NC

PostPosted: Mon Oct 04, 2010 5:58 pm    Post subject: Reply with quote

No problem, let me know if you need any more info.

I was running SQL Prompt 4, I did an uninstall before installing the 5. I do not recall if I rebooted or not. Shocked

I can reproduce it with this script:

SELECT 'john' AS Fname, 'Jingle' AS Lname INTO #name
UNION
SELECT 'phil' AS Fname, 'Hart' AS Lname

SELECT * FROM #name AS N WHERE N.Lname = 'Hart'

--DROP TABLE #name

I noticed that the validation errors(red squibbles) return even after formatting, it was only temporary.

My local machine:
WinXP Pro Version 2002 SP3

Prompt:
5.0.0.365

SSMS:
10.0.2531.0

Connecting to SQL2008:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2)

Here is the system info from SSMS:
Microsoft SQL Server Management Studio 10.0.2531.0
Microsoft Analysis Services Client Tools 10.0.1600.22
Microsoft Data Access Components (MDAC) 3.85.1132
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 8.0.6001.18702
Microsoft .NET Framework 2.0.50727.3607
Operating System 5.1.2600

Thanks,
Stephen
Back to top
View user's profile Send private message
Paul Stephenson



Joined: 23 Jul 2010
Posts: 107
Location: Cambridge, UK

PostPosted: Thu Oct 07, 2010 9:06 am    Post subject: Reply with quote

Hi Stephen,

Thanks for the details. I've managed to see your issue with a similar setup.

I'm afraid the red squigglies you see are put there by SSMS 2008's own syntax checker (when connecting to a SQL Server 2008 DB), not by SQL Prompt. When I uninstalled SQL Prompt I got the same behaviour.

If you want to turn off Microsoft's red squigglies altogether then go to Tools > Options > Text Editor > Transact-SQL > Intellisense and uncheck Underline errors.

Regards,
Paul Stephenson
SQL Prompt Project Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
sdyckes



Joined: 01 Oct 2010
Posts: 3
Location: Charlotte NC

PostPosted: Thu Oct 07, 2010 1:28 pm    Post subject: Reply with quote

Thanks for following up.
That would explain the inconsistent action I experience. I prefer to use SQL Prompt, so I will just turn off the SSMS. I did not think to check the SSMS intellisense, as I had not seen that particular action before I had installed SQL Prompt 5, so I made a bad assumption.
Thanks again,

Stephen
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group