469,315 Members | 1,603 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Problem while copying BLOB from one table to another.

Hi geeks,

I have to transfer some blobs objects from one table to another
depending on certain condition. I am using a Stored procedure for
this.
The snippet of the stored procedure which does this is as below

UPDATE F_PITBINARY SET BINARYDATA =
LOCOPY(BINARYDATA,'DPPITBINARYDATA','BINARYDATA')
WHERE ID = v_id and FPIT.ID = v_fpit_id
AND (FPIT.codetype,FPIT.code,FPIT.subrange) IN
(
SELECT impdppit.codetyp,impdppit.acode,impdppit.baureihe_ code
FROM IMP_DPPIT impdppit
WHERE impdppit.gguid = v_dppbd.dppit_id
AND impdppit.lastimport = c_curr_import
);
But i am getting the following error when i try to build the stored
proc.
[IBM][CLI Driver][DB2/NT] SQL0440N No authorized routine named
"LOCOPY" of type "FUNCTION" having compatible arguments was found.

Any pointers would be appreciated.

Basic

Nov 23 '05 #1
1 2668
Basic wrote:
Hi geeks,

I have to transfer some blobs objects from one table to another
depending on certain condition. I am using a Stored procedure for
this.
The snippet of the stored procedure which does this is as below

UPDATE F_PITBINARY SET BINARYDATA =
LOCOPY(BINARYDATA,'DPPITBINARYDATA','BINARYDATA')
WHERE ID = v_id and FPIT.ID = v_fpit_id
AND (FPIT.codetype,FPIT.code,FPIT.subrange) IN
(
SELECT impdppit.codetyp,impdppit.acode,impdppit.baureihe_ code
FROM IMP_DPPIT impdppit
WHERE impdppit.gguid = v_dppbd.dppit_id
AND impdppit.lastimport = c_curr_import
);
But i am getting the following error when i try to build the stored
proc.
[IBM][CLI Driver][DB2/NT] SQL0440N No authorized routine named
"LOCOPY" of type "FUNCTION" having compatible arguments was found.


What kind of function is this LOBCOPY and how exactly is it supposed to
work? It is not a built-in function in DB2 UDB.

If you just want to copy a LOB value, treat it like any other value:

UPDATE tab2
SET lobColumn2 = ( SELECT lobColumn1
FROM tab1
WHERE ... )
WHERE ...

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mark Fisher | last post: by
reply views Thread by krystoffff | last post: by
7 posts views Thread by sime | last post: by
3 posts views Thread by Carmine | last post: by
2 posts views Thread by deepgun74 | last post: by
4 posts views Thread by Yaro | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.