Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Inserts with different conditions in pl/sql
INSERT INTO target_table (target_column) SELECT decode(source_column, '?', 98, 'X', NULL, source_column) FROM source_table;
Gints Plivna
IT Sistēmas, Merķeļa 13, LV1050 Rīga
http://www.itsystems.lv/gints/
Roland.Skoldbl om_at_ica.se To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Sent by: cc: root_at_fatcity.c Subject: Inserts with different conditions in pl/sql om 2001.11.13 10:20 Please respond to ORACLE-L
Hallo,
How can I write in a pl/sql block if I want to do an insert from one table
to another
table and at the same time translate the value '?' to 98 and the value
'X' to 'Missing info'
Both those values can exist in the first table.
The datatyupe in table one is varchar2 and in table two it is
numberdatatype.
Please help me.
Thanks in advance.
Roland S
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Roland.Skoldblom_at_ica.se
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: G.Plivna_at_itsystems.lv
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Nov 13 2001 - 04:21:27 CST
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |