Storing TD Stored Procedures

UDA

Storing TD Stored Procedures


Hi, this is so silly... I've not done this in a while and must be making a very basic but not obvious mistake. I've written a stored procedure. I do understand that it has to be compiled to make it executable but my recollection is that simply CREATEing the procedure will do the syntax checks for me. I'm trying to store my procedure but continue to get the error message - "Failure 3706 Syntax error: Invalid SQL Statement." I've looked this up but apparently 3706 is a "catch-all" so that didn't help either.

Trying to isolate the error, I've dumbed it down to the most basic syntax but the error remains.

I'm hoping somebody can help me recall how to do this.

CREATE PROCEDURE TESTIT ()
begin
end;

THANKS!!
3 REPLIES
Enthusiast

Re: Storing TD Stored Procedures

put the stored procedure definition into a file ( mysp.sql )

REPLACE PROCEDURE TESTIT()
begin
declare o_msg varchar(10) ;
end;

then in bteq do a

.compile file = mysp.sql;

The other option is put the definition directly to sql assistant and execute it ...
Enthusiast

Re: Storing TD Stored Procedures

I hope you would have connected to database before creating the procedure. If so, place the definition in Teradata SQL Assistant and Press F5. It will check the syntax.
REPLACE PROCEDURE TEST()
BEGIN
END;

Re: Storing TD Stored Procedures


hai all



This is siva i am new to teradata



first of all,i lik to share my problem with all



how run a bteq,fastload,mload in unix shell scripting any one can help me pleas send any scripts to me



Thank You 



sivaprasad kaja