|
On 01-Jun-2011 12:50 , Luis Rodriguez wrote:
Also, Shouldn't it be (i_date NUMERIC(8, 0) ?
On Wed, Jun 1, 2011 at 2:58 PM, James Lampert wrote:
<<SNIP>>
create function @@@@@@@@@@/DISPLAYDAT(i_date NUMERIC(8))
NUMERIC(8) and NUMERIC(8, 0) are the same for a routine parameter
declaration.
AFaIK the syntax diagram for the Packed and Zoned Binary Coded
Decimal data types across all SQL statements for the IBM i DB2 is
consistently defined such that a second argument for scale after a
specified precision is optional; the scale assumed by the SQL to be zero
when not specified:
<code>
.-(5,0)------------------------.
+-+-+-DECIMAL-+-+--+------------------------------+--+
| '-DEC-----' | | .-,0--------. |
'-+-NUMERIC-+-' '-(--integer--+-----------+--)-'
'-NUM-----' '-, integer-'
</code>
Note that both precision and scale are optional, as are the
parentheses to denote them, whereby the SQL assumes precision of five
and scale of zero.
Regards, Chuck
--
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 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.