Hello,
I was trying to build an example of application in ODC that have a Timer to fill the table with random data, like mentioned below:
But, when trying to test this SQL, some errors appear:
Apparently, the SQL Insert command is correct.
Is there any way to check were is the problem ?
Thanks, in advance.
Syntax for insert statement is incorrect. It should be
INSERT INTO {MinhaTabela} (Codigo, DataRegistro) and not INSERT INTO {MinhaTabela}.[Codigo], {MinhaTabela}.[DataRegistro]
A query worked for me is
INSERT INTO {MinhaTabela} (Codigo, DataRegistro)SELECTSUBSTRING(MD5(random()::text), 1, 10),TO_DATE('2020-01-01', 'YYYY-MM-DD')+ (random() * (CURRENT_DATE - TO_DATE('2020-01-01', 'YYYY-MM-DD'))::INT)::INTFROM generate_series(1, 1000);
with MinhaTabela ( Id (Auto), Codigo (Text : 50), DataRegistro(Date)
Hi Sven,
Like Siya mentioned your SQL syntax is wrong.
I just want to add that you can find the differences in SQL queries compared to OutSystems 11 here.
Hello, Syia and Beatriz,
Thanks for your comments and corrections.
Now it´s working as expected:
Tks in adv.