Author |
Message |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
Temp Tables in MS Management Studio not recognized |
|
I recently upgraded from SQL Assistant 4.x to 5.x. Since that time, the upgraded version does not recognize temp tables that I declare in my SQL code. I'm using Microsoft Sql ServerManagement Studio 9.00.1399.00 (SQL Server 2005) on a Windows 7 O/S.
Sample code follows:
DECLARE @T TABLE(
MYNUMBER INT,
MYDOG VARCHAR(15),
MYPRICE NUMERIC(10,2)
)
INSERT INTO @T
(
MYNUMBER,
MYDOG,
MYPRICE
)
VALUES
(
1,
'FLUFFY',
29.95
)
SELECT t.mydog FROM @T t
In the earlier version, when I typed "SELECT t." I would get a pop-up showing the three available fields in my temp table. Now I get the popup shown in the attached image. I use temp tables extensively and this is really slowing down my coding efficiency. Is there some setting in Options that I need to know about that will correction this functionality?

|
|
Thu Aug 19, 2010 12:45 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I tried that and it worked fine for me.
Which development environment do you use?
|
|
Thu Aug 19, 2010 12:57 pm |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
|
I'm using MS SQL Server Management Studio 9.00.1399.00 (SQL Server 2005) on a Windows 7 O/S.
|
|
Thu Aug 19, 2010 1:00 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I'm still unable to reproduce. Please try restarting your system. If you search this support board, you will find messages from people who experienced anomalies after installing SQL Assistant upgrades, but then after restarting everything was ok for them.
|
|
Thu Aug 19, 2010 6:22 pm |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
|
I've been having this problem since I upgraded from 4.x to 5.x back in March. I restart my system every day and the problem persists. I just now got irritated enough to post to the forum about it. :-)
|
|
Thu Aug 19, 2010 6:26 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Though I did not experience this one, I met a few smaller issues after installing different updates of v5 which I could resolve by exporting my settings (not completely, only those I changed), restoring setup default, importing them back and restarting both SQL Assistant and development environment. It might help and does not take too much time. Perhaps you could give it a shot...
|
|
Thu Aug 19, 2010 6:50 pm |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
|
Thanks, Gemisigo. My bad, I should have been more specific....
The 5.x is a clean install. I had 4.x on a previous laptop that was running Windows XP. When I got the new laptop, running Windows 7, I was required to get a new license to SQL Assistant, so I did a clean install of 5.x on the Windows 7 machine. I've had the temp table problem from Day 1 with the 5.x version, and I didn't make any changes to the default settings that I remember. However, I'll give your suggestion a shot. Maybe I should just uninstall and reinstall, since it doesn't seem to be a known bug.
|
|
Thu Aug 19, 2010 6:58 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Reinstalling should also work, still, if it was a clean install you could simply restore the default settings. I tried your example above and it was working for me. After introducing a syntax error into the definition of the table definition it ceased to popup correctly, but I doubt that it's the cause of your problem. Choosing reinstall I'd recommend restarting system between uninstalling and reinstalling. In case of Vista/Win7 it is also advisable to run SQL Assistant elevated at least the first time to avoid tricky problems arising from registry virtualization. Caused couple of annoying errors in the past, including settings disappear. This one might be the culprit here too.
|
|
Thu Aug 19, 2010 7:10 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Here is one other thing I'd like to suggest trying because this is a Windows 7 system. Please verify SQL Assistant add-on is properly registered. In the settings it display "Yes' in the register filed. If it say No, please restart it in Run As Administrator mode and then change No to Yes, otherwise the registration won't stick in the system registry. Please let us know if this helps.
|
|
Thu Aug 19, 2010 7:25 pm |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
|
So, I uninstalled and reinstalled the software. I have it set to run as Administrator. I rebooted after each step during the installation. And it still doesn't work.
Have you guys tested this in the same dev environment that I'm using? Same version of SQL Management Studio running on Windows 7?
|
|
Thu Aug 19, 2010 8:38 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Yes. I have tried the same, SSMS 2005 on Win 7.
Let's try to pinpoint the cause using a different method. Please open new SSMS instance, new editor window. In the editor, type or paste the following line, then press Enter key.
DECLARE @t TABLE(a INT, b VARCHAR(5))
Now, please type SELECT keyword and press space. At this point the list of tables should appear and @T should be in the list at the very top. Select it and press Enter. You should get
SELECT
t.a,
t.b
FROM
@t t
Press Enter again and type WHERE t.
At this point, do you get column popup with columns for table variable @t?
|
|
Fri Aug 20, 2010 12:17 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Just in case, here is my screenshot

|
|
Fri Aug 20, 2010 12:20 am |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
|
After the SELECT keyword I *did* get the list of tables with @T at the top.
But after the WHERE t. statement, I got a different popup, the same one that I attached to my original post. I didn't get the popup with the fields belonging to @T.
|
|
Fri Aug 20, 2010 11:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please attach the complete snapshot of the edit window with the popup you get after t. in the WHERE clause. Please use the same script that provided for the testing. This way I can compare it bit by bit.
|
|
Fri Aug 20, 2010 1:14 pm |
|
 |
swhight
Joined: 19 Aug 2010 Posts: 12 Country: United States |
|
|
Fri Aug 20, 2010 1:20 pm |
|
 |
|