|
To add a little challenge, make it into a utility using QMQRY and a command. INSERT INTO RGTSYS/UELLU (EENAME, EUSRID, ECPM, ECPMC) select EENAME, &Q&NEWNAME&Q, ECPM, ECPMC from uellu where eusrid = &Q&OLDNAME&Q Create the above as a *QMQRY called DUPUSR. Then have a command that has 2 parameters, and the CL will have use the command STRQMQRY DUPUSR SEVTAR((Q '''') (OLDNAME &OLDNAME) (NEWNAME &NEWNAME)) Now you have a tool to use anytime. p.s. - &Q puts the apostrophe in with no pain. Apostrophe needed to make the value a string, not a column name. -------------- Original message -------------- > Oh, that was just too easy. > Thanks. > > Michael Smith > iSeries.mySeries. > > > -----Original Message----- > From: Walden H. Leverich [mailto:WaldenL@xxxxxxxxxxxxxxx] > Sent: Friday, October 14, 2005 10:49 AM > To: Midrange Systems Technical Discussion > Subject: RE: SQL Insert > > > >INSERT INTO RGTSYS/UELLU (EENAME,EUSRID, ECPM, ECPMC) > >select EENAME, EUSRID, ECPM, ECPMC > > from uellu where eusrid = 'SMITHMI' > > Just select some constants. Change your select to "select EEName, 'Bob', > ECPM, ECPMC" and you should get 'Bob' in the EUSRID field. > > -Walden > > ------------ > Walden H Leverich III > Tech Software > (516) 627-3800 x11 > WaldenL@xxxxxxxxxxxxxxx > http://www.TechSoftInc.com > > Quiquid latine dictum sit altum viditur. > (Whatever is said in Latin seems profound.) > > > -- > 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 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.