THow to terminate teradata stored procedure..?

Database

THow to terminate teradata stored procedure..?

Hi,

I want to use this in Teradata Store procedure...

If flag = 1 then goto LABEL_EXIT

Else goto LABEL_OKAY

END if

flag is variable declared. I want to terminate my procedure if flag = 1...

Teradata is giving error at goto (Error : goto is reserved for future reference)

Can you tell how i can do this....???

Tags (1)
1 REPLY

Re: THow to terminate teradata stored procedure..?

If u want to terminate your procedure Use "leave"

ex
-- Start of SP
LABEL_OKAY:BEGIN

If flag = 1
LEAVE LABEL_OKAY;

--End of SP
end LABEL_OKAY;

-Barani