× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for the suggestions. I hadn't considered the overloading option.
However, in this case it won't work. I am building some custom apps against
ERP tables that are sometimes 100+ columns wide. I had planned on building
Insert/Update procedures for each table with default values for every column
so that when I was ready to insert records, I could only pass relevant
columns within the calling stored procedure instead of replicating the same
verbose INSERT INTO TABLE (columns list 100+ wide) VALUES (100+ wide)
statement in multiple procedures where most of the columns would not be
relevant.

In this case, 100+ procedures per table wouldn't even work because I would
have combinations as well (columns 0, 7, 13, 18, 21).

Anyway, thanks again.

RH


"Ryan Hunt" <ryan.hunt@xxxxxxxxxxxxx> wrote in
message news:g1p499$2s4$1@xxxxxxxxxxxxxxxx
Is there a way to declare default values for paramters in a procedures in
DB2/400?

I've looked high and low and I'm getting the impression there's not.
Other
platforms will let you do something like:

CREATE PROCEDURE MyProc(
IN Param1 char(1)=' ',
IN Param2 money = 0,
IN Param3 varchar(50) = null)
etc.

CALL MyProc (Param1='Y');

Param1 will equal 'Y'. Param2 and Param3 are available within the
procedure
as values 0 and NULL respectively. Does that situation exist in DB2/400?

Thanks

Ryan



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email:
MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.