All Forums Analytics
Madhavik-5580 6 posts Joined 01/08
12 Mar 2008
Can a stored procedure be called thru a view ?

Hi,In Teradata , Can we call a stored procedure thru a view ( this is possible in oracle ) ?And pointers would be highly appreciated.Regards,Madhavi

joedsilva 505 posts Joined 07/05
13 Mar 2008

No, but you can call a UDF

m_nardone 4 posts Joined 10/06
13 Mar 2008

On a similar note, I have two questions:a. can stored procs be called from a macro? -- see belowI want to use the macro like to pass the parm to the stored procsb. can macros execute other macros?again using it as a "driver" to ensure that the correct macros are executed.example of a.REPLACE MACRO my_db.my_macro (table_parm VARCHAR(30) ) AS(CALL SP_1(':table_parm') ;CALL SP_2(':table_parm') ;CALL SP_3(':table_parm') ;CALL SP_4(':table_parm') ;CALL SP_5(':table_parm') ;);then execute using EXEC my_macro ('customer') ;

joedsilva 505 posts Joined 07/05
14 Mar 2008

macros can call stored procedures as well as execute other macros ...however you cannot execute a macro from a stored proc as of v2r6

m_nardone 4 posts Joined 10/06
14 Mar 2008

when I try to execute code like the example I posted, I get Error 5497: CALL can not be submitted in multi statement request.If I eliminate all but one CALL stmt, it works, as suggested by the Error msg, but that doesn't help me at all. Any suggestions?

rgs 106 posts Joined 02/07
17 Mar 2008

A procedure can call other procedures. So you can have a macro call a procedure and that procedure can call other procedures. Keep in mind that everything executed by a macro is one request. Why not just call the procedure directly? Why have it go through a macro first?

You must sign in to leave a comment.