I am trying to use a filter in an OUTPUT clause in t-sql.
I want to do something like this:
Insert into tbl_1(col1,col2) Output Inserted.col1 into #tbl_temp **where col1 > 0** select col3, col4 from tbl_2
For performance reasons, I don't want to use two insert statements.
source share