0
 Followers
1
 Like

Copying content of a table to another table

Backend
New

It is good to have a functionality to copy content of a table by row or by column or the entire table itself and copy its content to another table. And also to be able to select multiple cells and delete all of its contents.

Created on 26 Jun 2018
Comments (3)

Hi Erwin,

What is the exact use case, what are you trying to achieve?

Do you mean page tables or entity data?


Changed the category to Backend


Hi Edwin, are you refering to at runtime or at design time? At runtime you can try using an SQL advanced query of type "INSERT INTO" https://www.w3schools.com/sql/sql_insert_into_select.asp 


For example

insert into {Addresses2} (Name,Address,StatusID)
select Name,Address,StatusID from {Addresses}

Note that you cannot insert auto increment ID fields this way as you will get an error like " An explicit value for the identity column in table 'OSDEV2.DBO.OSUSR_P1R_ADDRESSES2_T210' can only be specified when a column list is used and IDENTITY_INSERT is ON." and Outsystems seems to ignore IDENTITY_INSERT in an advanced query.

views
200
Followers
0