By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,558 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,558 IT Pros & Developers. It's quick & easy.

EXPORT DATA without quotes"

P: n/a
vj
Could anyone help me with the option which I need to include in a
export statement which would avoid the quotes " in the output for
columns with Data Type as String.

Vj.

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ian
vj wrote:
Could anyone help me with the option which I need to include in a
export statement which would avoid the quotes " in the output for
columns with Data Type as String.


You can use characters other than a quote (") by using the CHARDEL
filetype modifier, as in:

export to x.del of del modified by chardel< select * from table

Which results in strings like <Hello< (instead of "Hello").

I don't think you can eliminate the character delimiters without
coding a manual select (select col1 || ',' || col3 || ',' ...) -
they are essential in differentiating between a zero-length string
and a NULL.

Nov 12 '05 #2

P: n/a
If you use this method
db2 -tv "export to myfile.del of del MESSAGES msg.out select * from
table"
You will receive this result

"aaaaaa",1
"bbbbbb",2
"cccccc",3
---------------------------------------------------------------------
You can try with this method

db2 -tv"export to myfile.del of del MODIFIED BY NOCHARDEL MESSAGES
msg.out select * from table"

You will receive this result
aaaaaa,1
bbbbbb,2
cccccc,3

But NOCHARDEL parameter only suppot db2 V8.2
This is the result that I examined to
I wonder whether this result is what you want
-----------------------------------------------------------------------

Nov 12 '05 #3

P: n/a
If you use this method
db2 -tv "export to myfile.del of del MESSAGES msg.out select * from
table"
You will receive this result

"aaaaaa",1
"bbbbbb",2
"cccccc",3
---------------------------------------------------------------------
You can try with this method

db2 -tv"export to myfile.del of del MODIFIED BY NOCHARDEL MESSAGES
msg.out select * from table"

You will receive this result
aaaaaa,1
bbbbbb,2
cccccc,3

But NOCHARDEL parameter only suppot db2 V8.2
This is the result that I examined to
I wonder whether this result is what you want
-----------------------------------------------------------------------

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.