View previous topic :: View next topic
|
Author |
Message |
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
Hi,
How to insert a line break in db2.
I want the text to be split into seperate lines.
Thanks,
Sandhya |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
db2 is a product.
what are you talking about?
spufi output
qmf output
imbedded sql
db2 dump utility with sql?
provide an example so that i can follow your question. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
well since most of us keep telling that psychic day is on wednesday
they try to check if it is true by posting <funny> questions |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I used to wonder why z/OS and Windows people are different, now I understand - this question helps in that direction a bit more! |
|
Back to top |
|
|
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
I am talking abt the value in the column of a table.
We are inputting the data using a query |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sandhyaimmadi wrote: |
I am talking abt the value in the column of a table.
We are inputting the data using a query |
what does that have to do with a line break?
you are not being very clear with your question.
you are providing us with no information.
spend 2 minutes and describe what you are doing and what results you expect. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
sandhyaimmadi wrote: |
I want the text to be split into seperate lines. |
please specify "the text".
Are we talking about content within a CLOB or a VARCHAR ?
UNICODE/EBCDIC ?
Embedding x'0A' in a unicode CLOB or varchar constitutes a NewLine. Whether it will be displayed as a new line depends on your output platform/tool. |
|
Back to top |
|
|
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
The column is of type varchar
sample text is below. lines should be aligned as below
[For rolling or seasonal covenants:]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
GUI we are using is VC++
I have tried with embedding x'0A' but still it is not working. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
GUI we are using is VC++ |
the chances of getting help on a mainframe/zOS forum for VC++ things are pretty slim. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Sandhya,
If I remember my 'C' correctly, in order to get a line break you need Carriage Return along with Line Feed .
The problem I see here is the Line Feed in ASCII is x'0A' but in EBCDIC it is x'25'. Hex code for CR is same in EBCDIC as well as ASCII, x'0D'.
You can download the EBCDIC chart from the downloads link at the top of this page to confirm.
Please give this a try and let us know if it works. |
|
Back to top |
|
|
|