SQL Complete (2.50.86) Working with Table Variables

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
daveb
Posts: 9
Joined: Mon 28 Mar 2011 14:04

SQL Complete (2.50.86) Working with Table Variables

Post by daveb » Thu 07 Apr 2011 00:18

SQL Prompt does not appear to work well with table variables. For example, formaiting the folllowing:

Code: Select all

CREATE PROCEDURE dbo.Test1 ( @param1 INT
                           , @param2 INT )
AS 
BEGIN
    DECLARE @temp1 TABLE ( col1 INT
                         , col2 INT
                         , col3 INT
                         , col4 INT )

    SELECT  *
    FROM    @temp1 AS t
    WHERE   t1.col1 = @param1
            AND t1.col2 = @parm2

END
GO
Results in:

Code: Select all

CREATE PROCEDURE dbo.Test1(@param1 INT,
                           @param2 INT)
AS
BEGIN
  DECLARE @temp1 TABLE(
	col1 INT
	,
	col2 INT
	,
	col3 INT
	,
	col4 INT
  )

  SELECT *
  FROM @temp1 AS t
  WHERE t1.col1 = @param1
	AND t1.col2 = @parm2

END
GO
In addition, typing "t." after SELECT does not bring up a list of the columns in the @temp1 table.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Post by .jp » Thu 07 Apr 2011 07:51

SQL Prompt does not appear to work well with table variables.
...
In addition, typing "t." after SELECT does not bring up a list of the columns in the @temp1 table.
Table variable is a feature of SQL Complete, v2.60 that we are going to release in a few weeks. So, please wait for it.

Post Reply