All Forums Database
Altaaf 7 posts Joined 07/14
12 Jan 2015
'CALL Failed. HY000:'

When i call a stored procedure getting message 'CALL Failed. HY000:' no error code displayed. I am migrating oracle code to Teradata.I am new to stored procedures. Code is  as below....

REPLACE PROCEDURE DS.usp_ins_dvdselect

(IN p_sdate VARCHAR(1024), IN p_edate VARCHAR(1024),IN p_auditid NUMBER)

/*

$Id: //depot/DB/datawarehouse/dworacle/lib/plsql/ usp_extract_h_neworder.sql#3 $

$Author: derek $

$DateTime: 2006/03/23 08:46:24 $

$Change_Log

Name           Date                Description

======     ======            =============

Altaaf       1/7/2015      Code migration from Oracle to Teradata

*/

 

/*invalid_dml EXCEPTION;

PRAGMA EXCEPTION_INIT(invalid_dml, -20403);*/

 

BEGIN

 

DECLARE RAISE_APPLICATION_ERROR   CONDITION FOR SQLSTATE 'T0001';

/*DELETE FROM TT_T_DVDSELECT;

 

INSERT INTO TT_T_DVDSELECT

SELECT  *

FROM h_dvdselect;

 

INSERT INTO f_dvdselect (s_dvdslideshowid, s_orderid, s_style, s_styledesc, s_transitionmixid, s_transitionmix, s_transitionmixdesc, s_transitionid, s_transition, s_transitiondesc, s_coloreffect, s_borderid)

(SELECT DISTINCT  ( t.dvdslideshowid ), f.orderid, t.style,

t.styledesc, t.transitionmixid, t.transitionmix, t.transitionmixdesc,

t.transitionid, t.transition, t.transitiondesc, c.color, t.borderid

FROM TT_T_DVDSELECT t, d_color

c, f_order1placed f

WHERE t.coloreffectid = c.colorid

and t.orderserialno = f.orderserialno);*/

 

     /*   commit;

 

EXCEPTION WHEN OTHERS THEN

ROLLBACK;

COMMIT;

DWUtils.sp_log('main','Error " ' || SQLERRM || ' SQL: ' || SQLCODE);

RAISE_APPLICATION_ERROR(-20403, '<Invalid usp_ins_dvdselect DML> : error !');*/

 

CALL DS.sp_log('usp_ins_dvdselect','Error " ' || SQLSTATE || ' SQL: ' || SQLCODE,'','');

SIGNAL RAISE_APPLICATION_ERROR

    SET MESSAGE_TEXT='<Invalid usp_ins_dvdselect DML> : error !';

 

END ;

Rohan_Sawant 55 posts Joined 07/14
12 Jan 2015

Hi,
 
Please share a proper code with the proper concerns you have.
Not able to understand whats your requirement and where's the problem.
 
Thanks ,
Rohan Sawant

Altaaf 7 posts Joined 07/14
12 Jan 2015

Hi Rohan,
This is my call statement 'CALL DS.usp_ins_orderview('20110918','20110919',30)', records do get inserted in the table but after call comeltes i get  message as  'CALL Failed. HY000:......' i want to know why this message is coming and also the sqlstate T0001 is not displayed.I have pasted the code as is

Altaaf 7 posts Joined 07/14
15 Jan 2015

Hi,
Why this message comes up when i call the stored procedure and how to fix it?  
 'CALL Failed. HY000:......'

dnoeth 4628 posts Joined 11/04
15 Jan 2015

You expect reading unformatted code which is mainly commented out?
Of course you get an error, you throw it in your code using SIGNAL.

Dieter

You must sign in to leave a comment.