My first table is:
ID | Code | Description
1 | IT | Informatics
2 | GAM | Gamer
3 | PROG | Programmer
My second table looks like:
ID | Order | Catcod
1 | 8080 | {IT,GAM}
2 | 7051 |
3 | 5601 | PROG
Notice that the "Code" column in the first table is a Varchar column, and in the second table the Catcod column is a Varchar[] column.
The SQL i try to execute is:
SELECT *
FROM table2 RIGHT OUTER JOIN
table1
ON table2.Catcod = table1.Code
The error im getting is:
ERROR: operator does not exist: character varying[] = character varying
LINE 4: RIGHT OUTER JOIN gc1pbcat on gc1vrkordhdr.catcod = gc1pbcat...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
********** Error **********
ERROR: operator does not exist: character varying[] = character varying
SQL state: 42883
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Character: 216
Does anyone know a way how i can convert the Varchar[] into just Varchar, or maybe split the array?
Because i want to show the description of the Catcode in the Varchar[] in table2.
UPDATE
Or does someone have an awnser to my question how i can convert a Varchar[] to Varchar?