masri999
3/22/2007 5:22:00 PM
On Mar 22, 9:46 pm, "Sugandh Jain" <sugandh.j...@nirvana-sol.com>
wrote:
> Hi,
>
> I have a number of insert queries running in a batch on a single table.
> This query batch is passed to the stored procedure as a dynamic sql.
>
> I want to have all the rows that are inserted in this batch in a separate
> temp table with the same table structure as the parent table.
>
> how to get this?
>
> Regards,
> Sugandh
You may require a logic like identity column or time stamp. Before
executing the SP , findout the max(id) from the table.
After SP is completed
select * from into newtable from yourtable where id >max(id)