insert rows [message #681346] |
Thu, 09 July 2020 17:47  |
DRDBA
Messages: 22 Registered: March 2007
|
Junior Member |
|
|
I have following rows in a table:
DB_NAME T DESCR MOD_DATE MOD_BY
---------------- - ------ ---------------------------
DEVDW D CFSDW 27-APR-20 LOCAL
DEV C DEVDB 26-APR-20 LOCAL
I would like to add additional rows like below, there are similar tables with thousands or rows, can you please advise.
DB_NAME T DESCR MOD_DATE MOD_BY
---------------- - ------ ---------------------------
DEVDW D CFSDW 27-APR-20 LOCAL
DEVDW2 D CFSDW 27-APR-20 LOCAL
DEV C DEVDB 26-APR-20 LOCAL
DEV2 C DEVDB 26-APR-20 LOCAL
|
|
|
Re: insert rows [message #681347 is a reply to message #681346] |
Thu, 09 July 2020 19:36   |
Solomon Yakobson
Messages: 3214 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
It looks like you are looking for:
INSERT /*+ APPEND */ -- you can also add PARALLEL and see if it improves performance
INTO YOUR_TABLE
SELECT DB_NAME || '2',
T,
DESCR,
MOD_DATE,
MOD_BY
FROM YOUR_TABLE
/
SY.
[Updated on: Thu, 09 July 2020 19:39] Report message to a moderator
|
|
|
Re: insert rows [message #681351 is a reply to message #681347] |
Fri, 10 July 2020 11:53   |
DRDBA
Messages: 22 Registered: March 2007
|
Junior Member |
|
|
Thanks for the response, my actual requirement is to add a complete different value in column-1.
like this..
DB_NAME T DESCR MOD_DATE MOD_BY
---------------- - ------ ---------------------------
DEVDW D CFSDW 27-APR-20 LOCAL
QADW D CFSDW 27-APR-20 LOCAL-----> new row
DEV C DEVDB 26-APR-20 LOCAL
PROD C DEVDB 26-APR-20 LOCAL-----> new row
|
|
|
|
Re: insert rows [message #681355 is a reply to message #681346] |
Fri, 10 July 2020 15:33  |
 |
EdStevens
Messages: 1375 Registered: September 2013
|
Senior Member |
|
|
DRDBA wrote on Thu, 09 July 2020 17:47I have following rows in a table:
DB_NAME T DESCR MOD_DATE MOD_BY
---------------- - ------ ---------------------------
DEVDW D CFSDW 27-APR-20 LOCAL
DEV C DEVDB 26-APR-20 LOCAL
I would like to add additional rows like below, there are similar tables with thousands or rows, can you please advise.
DB_NAME T DESCR MOD_DATE MOD_BY
---------------- - ------ ---------------------------
DEVDW D CFSDW 27-APR-20 LOCAL
DEVDW2 D CFSDW 27-APR-20 LOCAL
DEV C DEVDB 26-APR-20 LOCAL
DEV2 C DEVDB 26-APR-20 LOCAL
Aside from any other comments about any other aspect of your problem - DO NOT USE 2-DIGIT YEARS WHEN SPECIFYING DATES!!!!!!!!! Does the the term 'Y2K bug' sound the least bit familiar?
|
|
|