Can a stored procedure be called thru a view ?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Can a stored procedure be called thru a view... Expand / Collapse
Author
Message
Posted 3/12/2008 2:58:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/10/2008 2:58:23 AM
Posts: 4, Visits: 107
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


Post #10910
Posted 3/13/2008 1:01:14 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/24/2008 2:47:14 PM
Posts: 425, Visits: 398
No, but you can call a UDF
Post #10917
Posted 3/13/2008 1:44:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/14/2008 1:50:04 PM
Posts: 4, Visits: 10
On a similar note, I have two questions:
a. can stored procs be called from a macro? -- see below
I want to use the macro like to pass the parm to the stored procs
b. 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') ;
Post #10928
Posted 3/14/2008 12:11:28 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/24/2008 2:47:14 PM
Posts: 425, Visits: 398
macros can call stored procedures as well as execute other macros ...

however you cannot execute a macro from a stored proc as of v2r6
Post #10938
Posted 3/14/2008 9:01:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/14/2008 1:50:04 PM
Posts: 4, Visits: 10
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?
Post #10943
Posted 3/17/2008 10:52:57 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 9/4/2008 11:27:02 PM
Posts: 64, Visits: 75
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?
Post #10966
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 8 ( 8 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 5:01am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 7 queries. Compression Disabled.