I am using UNLOAD in Informix with the DELIMITER "|" but I have problems because in some fields it has as part of the data the value | and then it gives me more fields than the correct ones, I tried with other separators but it's the same. Is there a better way to export the data than UNLOAD or is there a way to export each field enclosed in double quotes and delimited by "|"?
I am using the following:
UNLOAD TO "/ruta/al/archivo/nombre_tabla.txt' DELIMITER '|'
SELECT * FROM nombre_tabla;