 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
niezgod
Joined: 29 Jun 2011 Posts: 5 Country: Poland |
|
[SA 6 Beta] table variables |
|
Hi
I declare table variable and try to create select query from this variable.
Scenario 1:
type SELECT and space then I get list of tables and on top submenu named local variable. There was my variable (with description table) but where I select them it was added after SELECT like scalar variable with no option to list its fields:
 |
 |
DECLARE @a TABLE ( aa int, bb int)
SELECT @a |
I tried add a dot , space, ctrl + space, ctrl + Enter - no reaction.
Scenario 2:
Declare table variable, write SELECT FROM:
 |
 |
DECLARE @a TABLE (aa int, bb int)
SELECT
FROM @ |
Now I get list of my variables, select @a. @a added (without alias).
Return to SELECT section and try to add fields from my variable - no effect.
Also adding alias to variable in FROM section and trying to reference by this alias not helps.
Tested on MS SQL Server Management Studio 2005 developer edition + Windows XP and 3 different SQL 2005 servers.
As I remember this works fine for me in previous version.
EDIT:
Similar problem with temporary tables; such table exists on available tables list (ie. after FROM keyword ) but there no columns from this table available on columns list
|
|
Tue Jul 05, 2011 2:07 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I'm not sure the behavior is any different in previous versions. At least I failed to find any differences in this sense between 5.2 and 6.0.beta.
|
|
Tue Jul 05, 2011 1:41 pm |
|
 |
|
|
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
|
|
|