473,508 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 V8 String Parsing Question

2 New Member
Dear DB2 Experts,
I have many rows in a table which is of the format as shown below. The last column starting from "#Wed Oct 08 13:51:35 EDT 2008 to the closing " after the ROUNUM are multi-lines.

2250307,"120005",1,2493133200000,1,0,"#Wed Oct 08 13:51:35 EDT 2008
C_NUMBER=5001
RNUMBER=1234567890
CH_AMOUNT=50.00
RO_NUM=011401533
AC_NUMBER=223344557788
AlType=ItemCleared
ACCNUMBER=223344557788-1
ACC_TYPE=Checking
ONETIME=true
ROUNUM=012345660
"
I would like to know if there is way to combine all the multilines into a single line separated by a separator like
2250307,"120005",1,2493133200000,1,0,"#Wed Oct 08 13:51:35 EDT 2008,
C_NUMBER=5001,RNUMBER=1234567890,CH_AMOUNT=50.00,R O_NUM=011401533,AC_NUMBER=223344557788,AlType=Item Cleared,ACCNUMBER=223344557788-1,ACC_TYPE=Checking,ONETIME=true,ROUNUM=012345660"


Thank you in advance for your reply.
Kumar
Oct 12 '08 #1
1 2982
docdiesel
297 Recognized Expert Contributor
Hi,

you may use the REPLACE() function of DB2 (see also IBM DB2 Infocenter). I guess you'll have to escape the LF character as CHAR(10), or if it's text from a Windows system CHAR(10*256+13).

Regards

Doc Diesel
Oct 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3896
by: Michael Hogan | last post by:
I want to pars a playlist file for three different varibles, so I can save them as mp3 files. I am using: strTEMPURL = GetUrlSource(Text1.Text) to put the entire .pls file into a strTEMPURL...
15
3598
by: Freddie | last post by:
Happy new year! Since I have run out of alcohol, I'll ask a question that I haven't really worked out an answer for yet. Is there an elegant way to turn something like: > moo cow "farmer john"...
26
808
by: Kai Jaensch | last post by:
Hello, i am an newbie and i have to to solve this problem as fast as i can. But at this time i don´t have a lot of success. Can anybody help me (and understand my english :-))? I have a...
10
2611
by: Christopher Benson-Manica | last post by:
(if this is a FAQ, I apologize for not finding it) I have a C-style string that I'd like to cleanly separate into tokens (based on the '.' character) and then convert those tokens to unsigned...
8
8388
by: Bob Davis | last post by:
In C# one can construct a string using the format method. for example string newstring = string.Format("CC%d-%s.%d-%s-% d",123,"aaaa",456,"bbb",789); The resulting newstring will be...
29
4225
by: zoltan | last post by:
Hi, The scenario is like this : struct ns_rr { const u_char* rdata; }; The rdata field contains some fields such as :
4
1375
by: igotyourdotnet | last post by:
I have a question. I'm reading a CSV file that is uploading to my SQL db, I'm parsing out the file line by line. I'm getting the values and putting them into an arrayList seperate by commas. The...
3
2060
by: dimasteg | last post by:
Hi all C. Nead some help with string "on the fly" parsing, how it can be realized ? Any ideas? I got some of my own, but it's interesting to get other points of view . Regards.
0
1401
by: bruce | last post by:
Hi Fredrick Thanks for the reply. But since I don't have control of the initial text, is there something with python that will strip/replace this... or are you saying I should do a...
1
4351
by: eyeore | last post by:
Hello everyone my String reverse code works but my professor wants me to use pop top push or Stack code and parsing code could you please teach me how to make this code work with pop top push or...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.