Here is an example of an update:
UPDATE SPSOFT.PS_FA_BATCH_RUNCTL
SET AID_YEAR = &AIDYEAR#
WHERE PRCSNAME = 'FABUDGET'
AND INSTITUTION = 'FSU01'
So, declare your variables from the vara and use them in the insert where needed. I looked for a specific insert using a variable, but only found updates. In principle, the passing of a variable in SQL would be the same for Inserts/Updates/Deletes/Select.
------------------------------
Cheers,
Gary Chismar
Manager, Automic, PeopleSoft HCM/FI
Florida State University
Florida
------------------------------
Original Message:
Sent: May 27, 2022 06:54 AM
From: Dilaray Yavuz
Subject: INSERT TABLE TO SQL USING VARIABLES
Thank you for your answer. I have one more question. How can I insert data using SQL JOB?
Original Message:
Sent: May 27, 2022 01:09 AM
From: Markus Embacher
Subject: INSERT TABLE TO SQL USING VARIABLES
Hi,
SQL VARA objects are for retrieving values from external databases, not to insert data.
If you would like to insert data please use an SQL job.
Regards, Markus
Original Message:
Sent: May 26, 2022 06:46 AM
From: Dilaray Yavuz
Subject: INSERT TABLE TO SQL USING VARIABLES
Hello everyone,
I want to ınsert table to SQL database using variable object that I created.
I want to insert DATA_TYPE values to SQL table.
I tried different version in SQL Statement and does not work (I can not set values as 'JOBS' in SQL table);
{VARA.NEW.1,DATA_TYPE,1}
{VARA.NEW.1,DATA_TYPE,2}
&DATA_TYPE#
DATA_TYPE#
SQL table results
How can I manage this problem? Thanks for any input.