Board index » delphi » INSERT BLOB FORM TBL INTO TBL WITH SL

INSERT BLOB FORM TBL INTO TBL WITH SL

D6PRO
Hello !
Is it possible to insert a BLOB containt from a table to another one with an
SQL statement, like
Assuming T1.field1 is a string and T1.Field2 is a Blob, T2 has 1 field
MYBLOBFIELD and 1 record
INSERT INTO T1 VALUES('111', (SELECT MYBLOBFIELD FROM T2))
Thanks in advance   Gil Yoktan
 

Re:INSERT BLOB FORM TBL INTO TBL WITH SL


What you can do in SQL depends on which database you are using. Your example
will not work in any database because, even if the syntax is supported, the
subquery would have to return a singleton result.

--
Bill
(TeamB cannot answer questions received via email)

Re:INSERT BLOB FORM TBL INTO TBL WITH SL


Quote
>INSERT INTO T1 VALUES('111', (SELECT MYBLOBFIELD FROM T2))

The syntax you need would probably be

INSERT INTO T1(field1,field2)
SELECT '111', MYBLOBFIELD FROM T2

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads