|
<<SNIP>>
If the table OLDTABLE is created with SQL,
CREATE TABLE ROB/OLDTABLE (OLDDATEASNBR DEC (8 , 0))
adding the view
CREATE view ROB/oldtablel01 as (
select oldDate,
DATE(DIGITS(OLDDATE) CONCAT '000000') as trueDate
from rob/oldtable)
creates edit checking on the numeric date field
INSERT INTO ROB/OLDTABLE VALUES(20101231)
INSERT INTO ROB/OLDTABLE values(null)
INSERT INTO ROB/OLDTABLE VALUES(20101232)
SQL0802 - Data conversion or data mapping error.
6 -- Numeric data that is not valid.
If, however, you created the table with DDS
R OLDTABLER
OLDDATE 8S 0 ALWNULL
then creating the view
CREATE view ROB/oldtablel01 as (
select oldDate,
DATE(DIGITS(OLDDATE) CONCAT '000000') as trueDate
from rob/oldtable)
no longer performs edit checking.
INSERT INTO ROB/OLDTABLE VALUES(20101231)
INSERT INTO ROB/OLDTABLE values(null)
INSERT INTO ROB/OLDTABLE VALUES(20101232)
select * from rob/oldtablel01
OLDDATE TRUEDATE
20,101,231 2010-12-31
- -
20,101,232 ++++++++++
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.