blob (text) to character conversion
Posted in 1999
Topics: Data Types & Schema Design
Does anyone know a better way to convert a text data type field to a
character string besides:
locate text field in "filename"
create temp table (string char(500));
load from "filename" insert into temp table
select from temp table into character string.
This seems like a really slow, crappy way of accomplishing this task.
Also, does anyone know where I can find more information on blob's? Out of
the 15 or 20 books we have on hand, there is a whole 2 pages on the subject.
Drew
drewmoo wrote:
>
> Does anyone know a better way to convert a text data type field to a
> character string besides:
> locate text field in "filename"
> create temp table (string char(500));
> load from "filename" insert into temp table
> select from temp table into character string.>
> This seems like a really slow, crappy way of accomplishing this task.
> Also, does anyone know where I can find more information on blob's? Out of
> the 15 or 20 books we have on hand, there is a whole 2 pages on the subject.
What front-end development are you using? If 4GL or ESQL/C you can write
an ESQL/C module to do this. Set the loc_type to LOC_MEMORY and then insert the
memory buffer or to LOC_USER and write your own interface
functions (actually the fastest way to handle BLOBS and easier than it
sounds) which could logically break up the BLOB and insert multiple rows
or anything else you want to do. Both are documented in the ESQL/C manual
and in several sample programs in the ESQL samples directory. Also you
can see some working LOC_USER code in the source for myschema.ec.
Art S. Kagel