Re: String manipulation a la INSTR
Posted in 2000
--- "Jeff Glenn" <jglenn@nospam.ep-services.com> > wrote: >In our old DB we have a NAME field. It stores last name, first name, which >is '/' delimited. I need to parse out the slash so I can extract just the >last name, or first name, and insert them into the appropriate columns. Are you dumping the data to a delimited file and then loading into Informix? If so, just use awk, or even sed (or even vi) to replace the / with a | in the text file. Make sure you close and open the quotes around your now split NAME string or you'll just get a single field like before only with a pipe in the middle instead of a slash. >I was hoping to find something similar to INSTR but I haven't found an >equivalent function in IDS. All I've found so far is SUBSTRING and SUBSTR, >but those require the starting position and the length of the substring to >be extracted. Doesn't work for me because it's unpredictable. > >We are running IDS 9.2, Sequent Dynix/PTX. == Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be. _____________________________________________________________ Want a new web-based email account ? ---> http://www.firstlinux.net