I like to extract records from oracle db, by writing a awl query .
The query should check if a column has comma then put content of that column in a double quote else do not put it in double quote. This will be extracted to a comma delemited file, so all columns are separated by comma:
A, gggg , "John , Silverado" , 12345
Thanks in advanced
change CHARINDEX to INSTR and "+" to "||":
Open in new window