Do
$$
DECLARE
ckadIncomingRequestRecId uuid = null;
begin
select public.uuid_generate_v4() into ckadIncomingRequestRecId FOR UPDATE;
INSERT INTO public."CkadIncomingRequests"
("RecId",
"RecCreated",
"RecUpdated",
"RecState",
"Type",
"Content",
"IsProcessed",
"IsError",
"RequestTime",
"RequestState",
"ContentType",
"SqlLowerBound",
"SqlUpperBound")
VALUES(ckadIncomingRequestRecId,
now() at time zone 'utc', --RecCreated
now() at time zone 'utc', --RecUpdated
0, --RecState
11, --Type
'', --Content
false, --IsProcessed
false, --IsError
now() at time zone 'utc', --RequestTime
0, --RequestState
2, --ContentType
now() at time zone 'utc', --SqlLowerBound
now() at time zone 'utc' --SqlUpperBound
);
INSERT INTO public."RawAnomalyTripsEsvp"
("RecId", "RecCreated", "RecUpdated", "CkadIncomingRequestRecId", "PlazaTransactionNumber", "Anomaly_06", "CreatedAt", "UpdatedAt")
select public.uuid_generate_v4(),
now() at time zone 'utc', --RecCreated
now() at time zone 'utc', --RecUpdated
ckadIncomingRequestRecId,
241005, --PlazaTransactionNumber
1, --Anomaly_06
now() at time zone 'utc', --"CreatedAt"
now() at time zone 'utc' --"UpdatedAt"
return;
END;
$$