Pages

04 January, 2024

Syntax error in the code creating a PostgreSQL procedure

CREATE OR REPLACE FUNCTION
Cree_RefFacture()
RETURNS trigger
AS
$BODY$
BEGIN
NEW."RefFacture" := nextval("dbo.Base_Factures_RefFacture_seq");
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql;



I get syntax error on this line :

Syntax error on or near “NEW”
LINE 7:NEW."RefFacture":=nextval"dbo.Base_Factures_RefFacture_seq");




Something wrong in your opinion?


I've tried various solutions, I keep getting the same error. Could you help me please

No comments:

Post a Comment

Thanks