473,378 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2955
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bobb | last post by:
(I'm a long term newbie :) ) I wanted to copy a blob's contents in mysql in python from one record to another. I had a heck of a time with it, so I wanted to post it for others. The where clause...
0
by: Mark Fisher | last post by:
I cannot seem to store binary data as a BLOB. I used the following to create a table capable of holding a BLOB: CREATE TABLE blob_table ( id INT UNSIGNED NOT NULL AUTO_INCREMENT,...
0
by: krystoffff | last post by:
Hi I have the following database under MySQL 4.1 : //////////////////////////////////////////////////// # Table structure for table `affiliate_lockout` # CREATE TABLE `affiliate_lockout` (...
4
by: Mee Yamo | last post by:
Fellas!! This is a very complicated one and it took me a few days to figure out exactly what's going on, but here's the final story: I have a production environment running on .NET with a SQL...
7
by: sime | last post by:
Hi, I have a blob field in a mysql database table. I want to copy a blob from one record to another. I am having trouble transferring the data via a php variable. Maybe I need to addslashes or...
3
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? ...
2
by: deepgun74 | last post by:
I have a blob column that is 4MB in length. I need to change it to store a 3GIG binary. 1) What is the maximum size a BLOB column can support? 2) How do i alter the size of an existing BLOB...
4
by: Yaro | last post by:
Hi, I am looking for information how calculate size of table with BLOB field. After RUNSTATS command select fpages * tablespace pagesize - gives me only 16kB (table contain about 10M) I...
2
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.