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



I don't know java well enough to help with that part. But, the SQL is pretty
standard insert with subselect. In the SQL below, I am changing only the
AUDDT and AUDTM fields for all records with an audit date of 2007-12-15.

INSERT INTO V84FILES#/INITP100 (ACTIV, CMPNO, PLTNO, AUDDT, AUDTM,
AUDUS, TCODE, PRDNO, HOUSE, ITTDT, ITTIM, REFNO, ITTR1, QUANT,
UCOST, CLASS, AISLE, ROWID, TIER#, ITDGL, ITCGL, ITVGL, IGLAM,
ITCAM, ITVAM, ITGLS, ITSLT, ITLOT, PFLAG, PGMID, REFN2, REFN3,
ITMTK, ITEFT, ITIUM, ITEUM, ITEQY, ITPTY)

SELECT ACTIV, CMPNO,
PLTNO, 'NEWDATEHERE', 'NEWTIMEHERE', AUDUS, TCODE, PRDNO, HOUSE, ITTDT,
ITTIM,
REFNO, ITTR1, QUANT, UCOST, CLASS, AISLE, ROWID, TIER#, ITDGL,
ITCGL, ITVGL, IGLAM, ITCAM, ITVAM, ITGLS, ITSLT, ITLOT, PFLAG,
PGMID, REFN2, REFN3, ITMTK, ITEFT, ITIUM, ITEUM, ITEQY, ITPTY
FROM Initp100
WHERE auddt='2007-12-15'

Mike Krebs
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Burdette
Sent: Wednesday, August 08, 2007 4:37 PM
To: java400-l@xxxxxxxxxxxx
Cc: java101-l@xxxxxxxxxxxx
Subject: SQL, importing data from record to new record to insert....

Hi;

I am writing a transaction record with 28 fields. All but two of these
fields are the same as a record I already have in the file.

Any one know of a way in SQL to copy/move/insert the data from the one
record to the new record? I could then just update the two fields and write
it.

Thanks



NOTICE: This message contains information which may be confidential. If the
reader is neither the intended recipient nor a person responsible for
delivering the message to the intended recipient, you are notified that any
distribution, copying or retention of this communication is strictly
prohibited. If you have received this communication in error, please notify
us immediately by return e-mail, telephone or facsimile. Thank you.


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.