エラーを表示する単一引用符内で一時テーブルを作成しようとしましたが、テーブルを識別できません#newtable
...サポートするのは##table
(グローバル一時テーブル)だけですが、グローバル一時テーブルは必要ありません。誰かが説明する理由が欲しいだけですお願いします。
select
column1, column2, column3, ##newtable.columnid as ShipProfile,
row_number() over (order by Id) as ''RowNumber''
into
##TempProduct
from
Product
left join
##newtable on Product.columnId = ##newtable.ColumnId
where
MerchantId= ' + convert(varchar(20), @MerchantID)