If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > What is the mistake in it?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-03, 13:44
asram asram is offline
Registered User
 
Join Date: Jul 2003
Posts: 34
What is the mistake in it?

I'm using UDB 8.1 on AIX 4.3........
db2 => call NUPROD.SP_GET_REPORT_PDF(7167)
DB21036E The CALL command failed.

CREATE PROCEDURE NUPROD.SP_GET_REPORT_PDF ( IN REPORT_ID int,
OUT REPORT_PDF blob(3000000) )
SPECIFIC NUPROD.GET_REPORT_PDF
RESULT SETS 1
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN


SELECT
NUPROD.PLAN_REPORT.DOCUMENT INTO REPORT_PDF
FROM
NUPROD.PLAN_REPORT
WHERE
(
( NUPROD.PLAN_REPORT.ID = SP_GET_REPORT_PDF.REPORT_ID )
);


END P1
Reply With Quote
  #2 (permalink)  
Old 11-14-03, 15:31
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Re: What is the mistake in it?

Your problem is that you also have an out parameter. You are trying to call it with only one parameter. Try:

db2 => call NUPROD.SP_GET_REPORT_PDF(7167,?)

HTH

Andy

Quote:
Originally posted by asram
I'm using UDB 8.1 on AIX 4.3........
db2 => call NUPROD.SP_GET_REPORT_PDF(7167)
DB21036E The CALL command failed.

CREATE PROCEDURE NUPROD.SP_GET_REPORT_PDF ( IN REPORT_ID int,
OUT REPORT_PDF blob(3000000) )
SPECIFIC NUPROD.GET_REPORT_PDF
RESULT SETS 1
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN


SELECT
NUPROD.PLAN_REPORT.DOCUMENT INTO REPORT_PDF
FROM
NUPROD.PLAN_REPORT
WHERE
(
( NUPROD.PLAN_REPORT.ID = SP_GET_REPORT_PDF.REPORT_ID )
);


END P1
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On