[Advance Query] Question about the privileges of the outsystems connections
Question
Forge component by Paulo Fagundes Jr.
Application Type
Service

I like copy data in a table with an identity column.

Is there a by outsystems provided connection where I have the privilege to execute the following statements:

set identity_insert <Table_name> off
set identity_insert <Table_name> on
DBCC CHECKIDENT (<Table_name>, RESEED)

or is there a other way to do the task with keeping the same Id's 


If you are working with an external database table that has an identity column, you will need to use the SQL tool to toggle "IDENTITY_INSERT".

Query looks something like this:

SET IDENTITY_INSERT {Table_name} ON

INSERT INTO {Table_name} ({Table_name}.[ColumnA], {Table_name}.[ColumnB], {Table_name}.[ColumnC], {Table_name}.[ColumnD])

VALUES (x, x, x)

SET IDENTITY_INSERT {Table_name} OFF;


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.