hi all,
i have a problem with a sqlplus (v8) statement that queries several tables and writes the output into a csv file.
that works so far, but one of the tables is a encrypted user password. the problem is that the encrypted characters can also include control characters like LF (line feed) or CR (carriage return)and those shake my csv file completely up.

i have no clue how to quote those characters. is there a trick inside sqlplus, or do i need to solve this problem somehow in the shell script?

any hints welcome

br,
pender

no ideas?

might it be necessary to convert the encryptet password in hex values? is there a function in sqlplus like to_hex?

i have to check ...

with strip you mean to cut it out?

that might help not to destroy the csv file, but im pretty sure the encrypted password wont work anylonger, after cutting some information out.

or did i get you wrong?

Well I guess I said strip (cut out), but you could also use sed or awk to replace the newlines with some other characters. I say characters, because if you do a simple character, you won't know if it is an original character, or if it is a replaced character... but if you replace every instance of \n with _:_ for example, then in your CSV file, all the _:_'s represent a \n. |+| for all of your \r's. Then, Translate them back before you try to use them (or is that not possible)?

that might do the trick.
thanks for your input.

for the moment i dont know about the abilitys of "the other side" which is importing the data. i´ll keep you updated.

lg, Pender

This article has been dead for over six months. Start a new discussion instead.