proaceteam
asked on
How to export data from Oracle with double quotes around text columns
I need my client to export data from their Oracle server (not sure which version) to a flat file. My flat file format requirements are:
1) comma delimited
2) double quote around text columns for every row including both empty and NULL
For example, when the schema has 2 columns, the first column is ID which NUMBER, the secound column is NAME which is string.
When ID is 1 and NAME is Jim, I want the exported line to be
1, "Jim"
When ID is 2 and NAME is empty string, I want the exported line to be
2, ""
When ID is 3 and Name is NULL, I want the exported line to also be
3, ""
I was told that they can not do this when the string is empty or NULL. The best they can do is to to write NULL when the string is NULL, i.e.:3, NULL
This format can be easily done in Microsoft SQL Server. I can't believe that Oracle can not handle this. I do not have an access to any Oracle environment and I can not play with the export utilities myself. Please let me know if you have a way to export data the way I describe on Oracle.
1) comma delimited
2) double quote around text columns for every row including both empty and NULL
For example, when the schema has 2 columns, the first column is ID which NUMBER, the secound column is NAME which is string.
When ID is 1 and NAME is Jim, I want the exported line to be
1, "Jim"
When ID is 2 and NAME is empty string, I want the exported line to be
2, ""
When ID is 3 and Name is NULL, I want the exported line to also be
3, ""
I was told that they can not do this when the string is empty or NULL. The best they can do is to to write NULL when the string is NULL, i.e.:3, NULL
This format can be easily done in Microsoft SQL Server. I can't believe that Oracle can not handle this. I do not have an access to any Oracle environment and I can not play with the export utilities myself. Please let me know if you have a way to export data the way I describe on Oracle.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.