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
![](https://secure.gravatar.com/avatar/cd0747a39884df9a5dad74f9f9b2f41b?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
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.