Re: pipe delimited crconvert database
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43227
interpreted = N
texte = If the fields you want are always going to be 4|2|2|2 .. Etc characters longwhy not use a [listwords] to get the info ..[listwords include file=5day.txt&delimiters=%0D][!] ## hide the first row --[/!][hideif [index]=1][listwords words=[word]&delimiters=|] do stuff here [/listwords][/hideif][/listwords]You will need to organise the code so that there are no extra lines but itshould do the trick.Alain> Actually, it's been working it's just unpredictable. I have whittled the> problem down to one - one of my records is getting axed.> > Here's the file I am trying to convert (5day.txt), which is Accuweather in> case anyone else out there might want to subscribe to their wacky data> service:> > Saturday|Sunday|Monday|Tuesday|Wednesday> KINX|92|60|01|87|58|02|87|59|02|85|57|01|80|51|03|> VABR|90|57|01|86|55|02|85|56|02|84|56|01|79|49|02|> TN28|90|58|01|84|56|02|86|57|02|85|57|01|80|50|02|> > Yes, I realize there are two types of records in this file.> > So, I run a convertwords to get rid of the Sat, sun ,mon stuff. And then I> run a convert chars to translate the pipes to tabs.> > My code:> > [writefile 5dayFINAL.db][convertchars db=pipeconvert.db][convertwords> db=convertpipewords.db][include> file=5day.txt][/convertwords][/convertchars][/writefile]> > I want:> > KINX 92 60 01> VABR 90 57 01> TN28 90 58 ... etc> > > But what I end up with> > > KINX 92 60 01> > VABR 90 57 01> > and the TN28 record is missing.> > My convertwords db:> > from to> Saturday|Sunday|Monday|Tuesday|Wednesday (a blank tab here)> (yes, a return)> > And the convertchars :> from to> | %09> > > Any ideas?> > > > > > > > > > -----Original Message-----> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf> Of Kenneth Grome> Sent: Friday, September 06, 2002 10:27 PM> To: WebCatalog Talk> Subject: Re: pipe delimited crconvert database> > >> What does the conversion database for converting pipes to tabs?>> There was a discussion that showed:>> >> from to>> | %09>> >> But I believe that does not work.> > This should work fine, assuming you put a carriage return after the> %09. Have you tried it? Or are you just assuming that it won't work> because of something you read in the archives? If you try it and it> really doesn't work, try this instead:> > from to> %7C %09> > > > > Sincerely,> Kenneth Grome> > ---------------------------------------------------> WebDNA Professional Training and Development Center> 175 J. Llorente Street +63 (32) 255-6921> Cebu City, Cebu 6000 kengrome@webdna.net> Philippines http://www.webdna.net> ---------------------------------------------------> > -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://search.smithmicro.com/> > > -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
If the fields you want are always going to be 4|2|2|2 .. Etc characters longwhy not use a [listwords] to get the info ..[listwords include file=5day.txt&delimiters=%0D][!] ## hide the first row --[/!][hideif [index]=1][listwords words=[word]&delimiters=|] do stuff here [/listwords][/hideif][/listwords]You will need to organise the code so that there are no extra lines but itshould do the trick.Alain> Actually, it's been working it's just unpredictable. I have whittled the> problem down to one - one of my records is getting axed.> > Here's the file I am trying to convert (5day.txt), which is Accuweather in> case anyone else out there might want to subscribe to their wacky data> service:> > Saturday|Sunday|Monday|Tuesday|Wednesday> KINX|92|60|01|87|58|02|87|59|02|85|57|01|80|51|03|> VABR|90|57|01|86|55|02|85|56|02|84|56|01|79|49|02|> TN28|90|58|01|84|56|02|86|57|02|85|57|01|80|50|02|> > Yes, I realize there are two types of records in this file.> > So, I run a convertwords to get rid of the Sat, sun ,mon stuff. And then I> run a convert chars to translate the pipes to tabs.> > My code:> > [writefile 5dayFINAL.db][convertchars db=pipeconvert.db][convertwords> db=convertpipewords.db][include> file=5day.txt][/convertwords][/convertchars][/writefile]> > I want:> > KINX 92 60 01> VABR 90 57 01> TN28 90 58 ... etc> > > But what I end up with> > > KINX 92 60 01> > VABR 90 57 01> > and the TN28 record is missing.> > My convertwords db:> > from to> Saturday|Sunday|Monday|Tuesday|Wednesday (a blank tab here)> (yes, a return)> > And the convertchars :> from to> | %09> > > Any ideas?> > > > > > > > > > -----Original Message-----> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf> Of Kenneth Grome> Sent: Friday, September 06, 2002 10:27 PM> To: WebCatalog Talk> Subject: Re: pipe delimited crconvert database> > >> What does the conversion database for converting pipes to tabs?>> There was a discussion that showed:>> >> from to>> | %09>> >> But I believe that does not work.> > This should work fine, assuming you put a carriage return after the> %09. Have you tried it? Or are you just assuming that it won't work> because of something you read in the archives? If you try it and it> really doesn't work, try this instead:> > from to> %7C %09> > > > > Sincerely,> Kenneth Grome> > ---------------------------------------------------> WebDNA Professional Training and Development Center> 175 J. Llorente Street +63 (32) 255-6921> Cebu City, Cebu 6000 kengrome@webdna.net> Philippines http://www.webdna.net> ---------------------------------------------------> > -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://search.smithmicro.com/> > > -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Alain Russell
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
TCPconnect issue (2000)
Installation webCatalog (French speakers please help) (1998)
The IBC root beer has arrived! (1997)
[WebDNA] contents of db files disappearing including triggers.db (2019)
Where's Cart Created ? (1997)
Shipping Costs Not Updating When Adding Items (1997)
Not really WebCat (1997)
strange [date] behavior (2001)
Server crash (1997)
Setting up shop (1997)
AuthNumber, ResponseText etc (2005)
oddball sorting problem (2003)
[MOVEFILE] question (2004)
Quit revisited (1997)
WebCat b13 CGI -shownext- (1997)
Shipping based on qty (1998)
A few questions. . . (1997)
Search in 2 or more catalogs (1997)
WebCat2 beta 11 - new prefs ... (1997)
weird G3 happenings (1998)