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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.