I have a groups table which has a field called permissions that has a pipe separated value.
for example
permissions='1-1|2-2|3-2|4-2|5-2|6-2|7-1|8-2|9-2|10-2|11-2|12-2|13-3|14-2|15-2|16-2|
Now I want to append the following values to all permissions field in the groups table:
|17-0|18-0|19-0
So i need something like
UPDATE groups SET permissions='existing value+|17-0|18-0|19-0';
I am not sure how to go about it.( I am using informix)
Reading a bit about this, in informix concatenation with null gives null. If the field permissions can be null, the update needs to be changed a bit.
If permissions can’t be null, then this is enough: