Hi everyone,
First question in this cool community!
How can one the has a table containing a foreign key add a column containing a value from that foreign key's record?
If I would use the "Airtable language": adding a "lookup" field of a "linked record"?
Thanks @ScottR,
I want to get the "name and "folderId" from the "scenarios" table to the "logs" table according to the "scenarioId" that is the foreign key (which is the primary key "id" in "scenarios" table).
The two fields folderId and name must already be existing columns in the logs table for you to insert them into the logs table. YOu can then use a with clause statement:
WITH selected_scenarios AS (
SELECT name, folderId
FROM scenarios
)
INSERT INTO logs (name, folderId)
SELECT name, folderId
FROM selected_scenarios;