Re: moving text BLOBS?
Posted in 1997
Paul Watson (paulw@wfsoftware.co.uk) wrote:
: Maybe like Joe I'm missing the point but would the following do what you
: want?
: insert into
: select col1, col2, col3, "Blob type a"
: from tableA
: where type A blobs condition
: union
: select col1, col2, col3,"Blob type b"
: from tableA
: where type b blobs condition
: union
: select col1, col2, col3, "Blob type c"
: from tableA
: where type c blobs condition
Paul:
Thanks for the suggestion. I didn't use "union" but ran three
separate command sequences:
insert into tableB (col1, col2, col3)
select col0, colX, "sectionX"
from tableA
where colX is not null;
insert into tableB (col1, col2, col3)
select col0, colY, "sectionY"
from tableA
where colY is not null;
insert into tableB (col1, col2, col3)
select col0, colZ, "sectionZ"
from tableA
where colZ is not null;
where colX, colY, and colZ from tableA are my BLOB columns and col0 is
a unique indexed column used to join the two tables. I don't want an
inserted row if the BLOB is null, thus the "where" constraint.
I believe your "union" construction would allow only one "pass" through
the database, but I'm not sure!
Thanks,
Jim
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jim Kistler - kistler@an.hp.com # Some see issues and ask, "Why?
Hewlett-Packard Co. Imaging Systems # Others see opportunities and
3000 Minuteman Road, Andover, MA 01810 # ask, "Why not?"
TEL: 508-659-2251 - FAX: 508-687-7265 #
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-