Posted in 1995
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Migration, Import/Export & Data Conversion, Platform-Specific Issues
Howdy,
I have a bunch of strings which looks like "500 328 729", that
I'd like to seperate by whitespace and store into integer
variables - basically like:
define str char(100)
define counts array[3] of integer
select value from table into str
let counts = split(str, ...)
.. after which counts[1] equals 500, counts[2] is 328, etc.
What is the best way to do this?
I thought of unloading str to an ascii file, using run to call
a shell script or somesuch which would massage the unload file
and produce a load file, which is the loaded into a suitable
table created on the fly. Pretty horrible thought, yes? I haven't
tried it yet, but I expect it to be a lot slower than my users
would appreciate.
Any input is welcomed.
I'm running INFORMIX-4GL Version 4.11.UC2 on Solaris 2.3.
--
Stig Jacobsen / shj@dknet.dk http://www.dknet.dk/~shj
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.