I think you have to do the default values in the select statement:
insert into filea (fld1, fld2, fld3, fld4, fld5)
Select fld1, fld2, fld3, fld4, fld5, 0, 0, ' ', CURRENT_DATE, ' ' from fileb where <...>
-Tom Stieger
IT Manager
California Fine Wire
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Keith McCully
Sent: Monday, December 17, 2012 1:47 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL or not?
Or maybe:
insert into filea (fld1, fld2, fld3, fld4, fld5, 0, 0, ' ', CURRENT_DATE, '
')
select * from fileb where <...>
So fields 6 thru 10 get default values - they are not being used for this process anyway.
Can't try as not connected to a box right now....
On 17 December 2012 21:36, Keith McCully <keithmccully@xxxxxxxxx> wrote:
The fields come pre-defined and are not null-capable.
Will Charles' suggestion:
insert into filea (fld1, fld2, fld3, fld4, fld5) select * from fileb
where <...>
also load FileA fields 6 thru 10 with default values - including the
date field?
Thanks
On 17 December 2012 21:31, Glenn Gundermann <ggundermann@xxxxxx> wrote:
Hi Keith,
If the date is not null-capable, then I would set the data to 0001-01-01.
Glenn Gundermann
Email: ggundermann@xxxxxx
Cell: 416-317-3144
--
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.
--
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.