Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / September 2004

Tip: Looking for answers? Try searching our database.

LOAD via a Stored Procedure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thanos - 28 Sep 2004 23:36 GMT
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
Knut Stolze - 29 Sep 2004 11:54 GMT
> 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
[quoted text clipped - 6 lines]
> ....
> END

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

Signature

Knut Stolze
Information Integration
IBM Germany / University of Jena

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.