SQL: insert a row and return the primary key value

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
1 post Page 1 of 1


Posts: 5
Joined: Wed Sep 10, 2014 11:33 am

Post by rickc » Sat May 06, 2017 9:18 am
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?

1 post Page 1 of 1