I am using Vertica client driver version 8.1 to save data to temptable using the following query :
COPY TempTableName FROM STDIN DIRECT DELIMITER '|' RECORD TERMINATOR '\r\n' NO ESCAPE NO COMMIT;
while using this statement to add data to temp table I get a error if I have used "|" in the data to saved.
One of the ways to fix this is using ENCLOSED BY paramater like :
COPY TempTableName FROM STDIN DIRECT DELIMITER '|' RECORD TERMINATOR '\r\n' ENCLOSED BY '"' NO ESCAPE NO COMMIT;
But in this case if I used " in the data to be saved it leads to an error. This there are a generic way to handle this and insert all possible characters ('",.;/:?~!@#$%^&*|\/) on keyboard while saving.
