I've searched in the documentation and on this forum for an answer to my question prior to this post with no luck. I'm coming from an Oracle background, where answers to questions like this are very simple to find online. Not so much with Teradata, I'm finding! I have a macro with several parameters, and I have specified a few of them with default values. In an Oracle stored procedure, that would allow me to call the procedure without specifying those parameters. In Teradata, they are still required. What's the point of a default value, then?
create macro dropme_dummy(
not_important_ind char( 1 ) default 'Y' )
exec dropme_dummy( 12 );
EXECUTE Failed. 3816: The positional parameter list has too few values.
exec dropme_dummy( 12, 'N' );
What's the deal? How can I just create an optional parameter in a macro or stored procedure?
Thanks in advance...
Not sure about SP, but if you have to pass the default parameter to SP, you can use macro to pass default parameter and call SP from the macro.