Better work with temporary tables variables
The script below does not generate the correct sql syntax when adding a @table name into a subselect
DECLARE @temptable AS TABLE (recid INT)
DECLARE @mytable AS TABLE (contractid INT)
INSERT INTO @mytable
( contractid )
VALUES ( 1 -- contractid - int
)
---> type @my -> then tab
--> the table is predefined with brackes wich is wrong for a @table
-> the below row is the result
SELECT * FROM @temptable WHERE recid IN (SELECT * FROM [@mytable])
11
votes

This case should be fixed in the latest release of Prompt (6.3). Let me know if you’re still having any problems with it.