table copy with SQL in screen action

table copy with SQL in screen action

I have the following statements in a advance SQL Query:

SELECT [Test_Feild],[Test_Feild1] FROM {TEST_TABLE}

The statements validate and there are n errors but I get an Information message:

"Query returned no rows"

Does anybody have any idea why the records from {TEST_TABLE}are not being copied into {TEST_TABLE2}?

Hello Michael,

Are you testing the query inside the Service Studio or on Real Time? If is on the service studio you need to end the statement with commit.
For example:
  Delete from Table1 where Table1.field = "delete";

Regards I hope that helps,
Hugo Pinheiro
Hi Michael

Regarding your Advanced Query, and as Hugo mentioned, if you are just clicking Test Query inside Service Studio, then whatever you do in it  will be rolled back. So if you are running INSERT (or even DELETE) statements in an Advanced Query, they are run and then rolled back. If you in fact want to confirm that you get the desired behavior you need to either Run or do 1-Click Publish of the eSpace.

I would also like to alert that, except for very specific cases (e.g. bulk copy of massive amounts of data) using INSERT INTO ... SELECT FROM in OutSystems is something you should avoid, as you lose all the "built-to-change" benefits: if you later change your data structure (add more attributes) Service Studio will not be able to know that and you need to manually go and detect that. You should opt for a Query --> ForEach --> CreateRecord.