× 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.



Try *map *drop

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Keith McCully
Sent: Monday, December 17, 2012 4:14 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL or not?

Actually, I tried CPYF *MAP first of all. Got a message complaining that
the number of fields didn't match between the files.

Does CPYF *MAP only work if ALL fields in the TO file get populated from
the FROM file? I believe it's okay to have additional fields in FROM file
that are not in the TO file but those could be removed using the *DROP
option.




On 17 December 2012 21:57, Booth Martin <booth@xxxxxxxxxxxx> wrote:

Does a simple CPYF *MAP do what you want to do?

On 12/17/2012 3:47 PM, Keith McCully wrote:
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.




--
Booth Martin
802-461-5349
http://www.martinvt.com
--
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.