Hello,
I have some extensive stored procedures that copy complete records from like tables across several databases. I'm using #temp1 withing EXEC statements and this works great.
Is there any way to do this if the table that is being copied to is not exactly the same as the table that the record is coming from? In other words, I need one extra field at the end of the target table. The purpose of this is to identify which database the record came from. The two tables are otherwise identical. I have tried and am getting an error because the structures are different.
Thanks for any help.
I have some extensive stored procedures that copy complete records from like tables across several databases. I'm using #temp1 withing EXEC statements and this works great.
Is there any way to do this if the table that is being copied to is not exactly the same as the table that the record is coming from? In other words, I need one extra field at the end of the target table. The purpose of this is to identify which database the record came from. The two tables are otherwise identical. I have tried and am getting an error because the structures are different.
Thanks for any help.