I am trying to convert SQL Server procedure to PostgreSQL.
In the SQL Server procedure There are statements like below
SET @val = ‘(‘ + @someval + ‘)’
So in postgresql I wrote as below
SET val = ‘(‘ || someval || ‘)’;
But the above statement giving error at ||
Any body can please tell me where am I making mistake
Advertisement
Answer
AFAIK, SET statement in PostgreSQL used for changing configutation parameters, for variable assignment just use :=
:
val := '(' || someval || ')';