Text Blobs and LOCATE
Posted in 2000
Topics: Data Types & Schema Design
I'm trying to transfer a piece of data from a table where it's a CHAR data type to a table where it's a TEXT data type. Is there some way I can do this without having to back out to C code? -Andy- Bristol, England
The answer here ( IMO ) is no. You cannot use LET etc. What you can do ( from the manuals ) is input directly onto a form which then gets placed into the blob. You can specify the editor etc. Thats as much as I know. I ended up using cfuncs. I looked at this subject only a short while ago and couldn't find a solution. Try dejanews, to check the responses I got. Cheers.
One way to do it : UNLOAD the CHAR data to an ascii file; then load it into a "new" table in which the CHAR column has been replaced by one defined as TEXT. Rudy Andy Kent wrote: > I'm trying to transfer a piece of data from a table where it's a CHAR data > type to a table where it's a TEXT data type. > > Is there some way I can do this without having to back out to C code? > > -Andy- > Bristol, England
Andy Kent wrote: > I'm trying to transfer a piece of data from a table where it's a CHAR data > type to a table where it's a TEXT data type. > > Is there some way I can do this without having to back out to C code? I think that you have to code this in ESQL/C, HOWEVER, you do not have to actually do any coding, unless this will be part of some application. You can use my dbcopy.ec utility which should be capable of copying from a char column to a TEXT column. I honestly have not tried to do that but I see no reason why it would not work. Dbcopy is contained in the package utils2_ak. If I get some time I'll give such a copy a try myself. Even if it does not work now, it should not be hard to make it work, interesting problem. Art S. Kagel