473,394 Members | 1,800 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,394 software developers and data experts.

LOAD via a Stored Procedure

Can you use a the load or import command in a stored procedure??? I
tried to LOAD FROM blah blah...within a stored procedure but i get a
error that was not expecting the worD LOAD! Any ideas??? TIA!

i.e

CREATE PROCEDURE LOAD_DATA()
SPECIFIC LOAD_DATA
LANGUAGE SQL

BEGIN
LOAD FROM C:\TEMP\DATA.DAT...... <<<< I GET THE ERROR ON THIS
LINE???
......
.....
END
Nov 12 '05 #1
1 3879
Thanos wrote:
Can you use a the load or import command in a stored procedure??? I
tried to LOAD FROM blah blah...within a stored procedure but i get a
error that was not expecting the worD LOAD! Any ideas??? TIA!
Yes, you can but you have to use an external programming language like C and
the DB2 APIs.
CREATE PROCEDURE LOAD_DATA()
SPECIFIC LOAD_DATA
LANGUAGE SQL

BEGIN
LOAD FROM C:\TEMP\DATA.DAT...... <<<< I GET THE ERROR ON THIS
LINE???
.....
....
END


LOAD is not an SQL statement but rather a DB2 command. Thus, you cannot
embed it into a LANGUAGE SQL procedure.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
by: SSW | last post by:
Hi: I'm trying to run Extended stored procedure, which is written in VC++ in window 2000 Professional. It works fine. But when I run it in windows 2003 I get following error ODBC: Msg 0,...
4
by: Vish | last post by:
Hi, I am having a problem with my form being too slow to load up. I have a 4-5 of comboboxes on the form that load a lot (~30,000 records) into them. So this is causing a lot delay (5-6 seconds)...
10
by: technocrat | last post by:
Hi, I am trying to declare and cursor and thn load from that cursor into another table. Since I have almost 4 million records, I cant do it without the cursor which reduces the time by almost...
0
by: babukgl | last post by:
Hi, We have a stored procedure which does a huge amount of transformation of data and it is running pretty slow. To avoid this we tried to create a cursor out of the SQL used in stored...
1
by: satish mullapudi | last post by:
Hi everyone, I am using DB2 v8.2. I am able to use the Data Movement Utilities (IMPORT/EXPORT/LOAD) from the db2 CLP. But now I got a scenario, where I need to call these utilities from within a...
0
by: Jwilliams | last post by:
I installed an application which adds an extended stored procedure. I've since uninstalled the application and deleted the xp it added, however when SQL Server 2000 starts the event 'Could not find...
1
by: okonita | last post by:
Hello all, I have a Java problem that I hope can be answered here. Very new to DB2 UDB and UDF (we are on DB2v9.5, Linux and Windows), I have managed to get the UDF registered but having problem...
0
by: David Beardsley | last post by:
I'm trying to write a stored procedure that will terminate a load for a given table using the SYSPROC.ADMIN_CMD procedure. When I take the syntax that works using Quest: LOAD FROM '/dev/null'...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.