mrtom
05/01/2022, 9:59 PMresult=queryexecute(sql,[],{datasource:dsnname});
DO $$DECLARE tid integer; BEGIN UPDATE some_table SET somefield='text', updated_date=CURRENT_TIMESTAMP where pk=2386 RETURNING pk INTO tid; END$$;
The query technically executes ok, as the value is updated in the db, but the return value is undefined. my original MSSQL code had a select statement at the end to return some fields.
what am I doing wrong?Myka Forrest
05/02/2022, 1:18 PMmrtom
05/02/2022, 2:28 PMMyka Forrest
05/02/2022, 2:29 PMMyka Forrest
05/02/2022, 2:34 PM2386
not the PK? Can you run a separate query to return this?mrtom
05/02/2022, 3:01 PMmrtom
05/02/2022, 3:36 PM