Page 1 of 1

SQL: insert a row and return the primary key value

Posted: Sat May 06, 2017 9:18 am
by rickc
I have a MFT project that inserts data to a Postgresql table.
The table is defined with a primary key using an auto-increment column.
Code: Select all
  tracking_id serial,
  filename varchar(100),
The insert statement has a "returning" clause to return the value of the tracking_id field after the insert is complete:
Code: Select all
insert into public.tracker
values (default,${tempchuScratch})
returning tracking_id;
I would like to use the trackind_id value us subsequent steps in the MFT project. How do I capture the tracking_id value?