Replace SQL DB Table

Replace SQL DB Table

  
Hi all,
I want to replace one SQL DB table from a backup.
I'd deleted some records, but i want to preserve the Identity Keys.
If I try to insert this data with the Insert Into I will get new Indentities.
Is there anyone who can help to solve this issue?
Thanks
Hi João,

You can use SET IDENTITY_INSERT temporarily to allow using the Id column in the insert.

Regards,
João Rosado

Hi João Rosado,

I  have a multitenant application and need inicialize the tables of a new tenant with an application example. I intend to build a bootstrap routine to put the data in excel files, and after copy it to a new instance tenant tables. But there is the autoincrement key problem. Can I use the SET IDENTIY_INSERT to resolve this ? How can I write this command within an Oustsystems Action Server ?

Thank you,

Roberto