hi
use this command to compile your storedprocedure after changing the file
name from *.sql to *.db2
and make sure you have this symbol @ at the end of the stored procedure
db2 -[Email Address Removed] -vf spname.db2
Thanks
Raaj
|---------+--------------------------------------------------------->
| | "Sheth Jignesh " |
| | <db2udbdba-ezmlmshield-x45909667.[Email Address Removed] | azydba.com> |
| | |
| | 08/20/2004 12:10 PM |
| | |
|---------+--------------------------------------------------------->
>----------------------------------------------------------------------------------------------|
| |
| To: "LazyDBA Discussion" <[Email address protected] |
| cc: |
| Subject: Stored procs in DB2 |
>----------------------------------------------------------------------------------------------|
Hi,
When I try to create asp in db2, it gives me the following error:
db2 -tf sp_get_flag_data.sql
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "CREATE PROCEDURE sp_get_flag_data ( IN p"
was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<values>". LINE NUMBER=14. SQLSTATE=42601
sp_get_flag_data.sql
CREATE PROCEDURE sp_get_flag_data
(
IN p_mdata_source_i
INT,
IN p_mdata_dob_d
DATE,
IN p_mdata_source_instance_c
VARCHAR(12),
IN p_mdata_record_i
INT
)
LANGUAGE SQL
BEGIN
SELECT FLAG_TRANSACTION_STREAM_I
,FLAG_TYPE_I
,FLAG_DOMAIN_I
,FLAG_C
FROM JS_FLAG_TRAN_DATA_TB
WHERE MDATA_SOURCE_I
=
p_mdata_source_i
AND MDATA_DOB_D
=
p_mdata_dob_d
AND MDATA_SOURCE_INSTANCE_I =
p_mdata_source_instance_i
AND MDATA_RECORD_I
=
p_mdata_record_i
WITH UR
;
END
Any thoughts .......
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page