temp tables - sql multi-part identifier #TempTable.ColumnName could not be bound -


So I have some floating tables that I have created and trying to move the column contents from one table to another I am

I am getting #TempTable from another table using a specific table argument. Once I am done with the current section, I want to move the contents of another template table ( # Table1 ) to # TempTable.ColumnName which The accumulated results of housing are logic sets.

In this way I did it:

  SET @ExecStatement = 'Eltar table # Add 1 table' + column name '' varchar (250) '; EXEC (@ExecStatement) set @ExecStatement = 'Update # Table 1 set #Table1.'+@ColumnName+' = # TempTable.ColumnName '; The error message appears on the exec (@execStatement)   

second SET statement.

Any help would be greatly appreciated. Nothing from an invalid update statement - SQL can not tell how to drag data.

See this as the second set statement:

  set @ExecStatement = 'Update # Table1 set' + @ColumnName + '= tt.TempConv #Inner from Table1 ta #TempTable tt (replace "id" with the appropriate column name)    on Inron Tt.Id = ta.Id   



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -