|
Archives of the TeradataForumMessage Posted: Thu, 11 Sep 2003 @ 19:22:05 GMT
Hi, I have had some ofline inquires so I thought I would post some more information here. I am not saying to avoid stored procedures or even Stored procedures with Cursors if cursors is the only way to solve the query. Stored procedurs have their place. The orginal concept of stored procedures was specifically to allow people to do some of the computing inside the box rather than transfering all the rows back to the client and process them there thus saving band with on the corporate network. Stored procedures can have more than 1 DDL/DCL statements whereas MACROS can't. create tables, users, grants all in one neat package. Stored procedure can handle RECURSIVE Queries. There is a nice example of this on the Teradata V2r5.0 Demo CD. You can use Parameterized SQL for stuff like database and table names which you can't do in a macro. Stored procedures can execute differnt LOGIC based upon the parameters. sel user into :myuser; if ( myuser == "BOB" ) . . . if ( myuser == "JOHN" ) . . .
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||