Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to use database columns in like condition

mist123Mar 28 2024 — edited Mar 28 2024

Hi All,

Oracle 11.2

The data in xxc_main table should be matched with attr1 and attr2 columns in xxc_target table.

I know there will be some mismatches but for me it is enough to match the data.

with xxc_main
as
(select 'COMPUTER SALES' from dual
union all
select 'SINGLE WALL-REBATE' from dual
union all
select 'YARD TRACTOR_LEASE' from dual
union all
select 'SALARY&WAGES' from dual
)
select * from xxc_main


with xxc_target
as
(select 'COMPUTER' attr1, 'SALES'attr2 from dual
union all
select 'SINGLE WALL', 'REBATE' from dual
union all
select 'YARD', 'TRACTOR_LEASE' from dual
union all
select 'SALARY', 'WAGES' from dual
)
select * from xxc_target
This post has been answered by Paulzip on Mar 28 2024
Jump to Answer
Comments
Post Details
Added on Mar 28 2024
1 comment
80 views