But this is not quite what I'm after.
I'll tell you what I've done. I exported data from a mdb file to a txt file. All data in the mdb file is in one column and looks like this
Column1
-------
1000,
sgfsdf,
sfsdf,
sfdsf,
[EMAIL PROTECTED]
1001,
test,
new,
blah
[EMAIL PROTECTED]
etc etc.
Now, I want the data in the table to be arranged like this:
Column1 Column2 Column3 Column4
1000 sgfsdf sfsdf sfdsf
1001 test new blah
I thought if I export it to a text file and apply some logic and rearrange the data as shown above then when I import it back to a new table, it will be stored in this fashion.
Its not impossible to do is it?! Can you please show me how to do this. I am going mad.
> <cfscript>
> text = "";
> crlf = chr(13) & chr(10);
> delim = "[EMAIL PROTECTED]";
> start = 1;
> cont = true;
> fOutput = Replace(fOutput,crlf,chr(10),"ALL");
> while(cont){
> end = Find(delim,fOutput,start);
> if(NOT end){
> end = Len(fOutput);
> cont = false;
> }
> line = Mid(fOutput,start,end-start);
> start = end + Len(delim);
> if(Len(Trim(line))){
> text = text & REReplace(line,"[#chr(9)# ]*#chr(10)#",",","ALL") &
> crlf;
> }
> }
> </cfscript>
> <cffile action=""
> file="employerNew.txt"
> output="#text#"
> addnewline="No">
>
> Depending on what you want to do, you may need to get rid of some
> leading and/or trailing commas in the lines.
>
> Btw, in cf a list delimiter is only one character. So if you set
> delimiters="[EMAIL PROTECTED]", you will have a new element when ~ , @ OR � is
> found.
>
> Pascal
>
> > -----Original Message-----
> > From: cf coder [mailto:[EMAIL PROTECTED]
> > Sent: vrijdag 2 april 2004 16:35
> > To: CF-Talk
> > Subject: how to get rid of the new line character
> >
> > hi guys I'm hoping someone can help me. I'm reading a text
> > file <cffile
> > action=""> > > file="employer.txt"
> > variable="fOutput">
> >
> > Looping through the text file, I've set the list delimter to
> > be "[EMAIL PROTECTED]".
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

