473,779 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(BINARYDA TA,'DPPITBINARY DATA','BINARYDA TA')
WHERE ID = v_id and FPIT.ID = v_fpit_id
AND (FPIT.codetype, FPIT.code,FPIT. subrange) IN
(
SELECT impdppit.codety p,impdppit.acod e,impdppit.baur eihe_code
FROM IMP_DPPIT impdppit
WHERE impdppit.gguid = v_dppbd.dppit_i d
AND impdppit.lastim port = 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 2995
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(BINARYDA TA,'DPPITBINARY DATA','BINARYDA TA')
WHERE ID = v_id and FPIT.ID = v_fpit_id
AND (FPIT.codetype, FPIT.code,FPIT. subrange) IN
(
SELECT impdppit.codety p,impdppit.acod e,impdppit.baur eihe_code
FROM IMP_DPPIT impdppit
WHERE impdppit.gguid = v_dppbd.dppit_i d
AND impdppit.lastim port = 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
1230
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 was the tricky part for me. It probably has poor syntax, but it works. (Obviously) it can be used cross table and across db's. import MySQLdb
0
2327
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, binary_stuff BLOB, PRIMARY KEY (id) );
0
1513
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` ( `member_id` bigint(20) NOT NULL default '0',
4
7211
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 Server (2000, SP3). The SQL Server is on a dedicated Proliant computer with 2GB RAM (the actual SQLServer.exe process has dynamic memory assignment and can reach up to 1.6GB RAM). Nothing else is running on that specific computer.
7
11484
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 convert to Hex or something. I've tried a few things but can't quite get it. Here is simplified code. mysql_select_db($dbname, $connection);
3
7311
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? Do I have to select data from the main table and the aux table or is the aux table done automatically? What's the best way to handle this?
2
17676
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 column? 3) I have an another column that is of type LONG VARCHAR. I would like to alter it to a CLOB as there is a size limit of 32KB on LONG VARCHAR. What is the best way to approach this conversion? Any help would be greatly appreciated.
4
9961
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 am interesting in 2 cases:
2
6534
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 retrieved byte/binary data as i got no idea on how to save them in our pc. For this situation, what i need to do is give the byte/binary data an extension (retrieved from another field in the table) in order to revert back to the original data i had in the...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.