I have the following code:
BEGIN x := split_part(text, ',', 1); UPDATE albumphoto SET order = 1 WHERE idtable = 1 AND idx = x; END
But my column table named idx is a numeric type, and split_part returns the character type in the variable x . I tried using CAST , but I do not know how to use it correctly.
Any ideas?
source share