Format bug for temp table alias
ByronBarton
Posts: 1 New member
Using SQL Prompt v9.3.0.6627, try formatting this and you'll see that Format drops the reference #my_tb on the JOIN clause, leaving the column as ambiguous and thereby fails SQL parsing:
CREATE TABLE #my_tb (database_id int)
INSERT INTO #my_tb VALUES (1), (2), (3), (4)
SELECT *
FROM #my_tb
JOIN sys.databases db ON db.database_id = #my_tb.database_id
The work-around is to provide an alias for #my_tb, but that shouldn't be necessary.
Thanks.
The work-around is to provide an alias for #my_tb, but that shouldn't be necessary.
Thanks.