Hi ,
I want to know if a table name can be inserted into output clause dynamically without passing table name as hardcoded value in an insert statement .
say I am firing the insert statement for table itest
insert into itest (j)
output inserted.i, inserted.j,'itest' as tablename into #new
select o.object_id from sys.objects as o
so here instead of hardcoding mytable name i want a system variable / somefunction .
please help ..
thanks in advance .