52 lines
1.0 KiB
Markdown
52 lines
1.0 KiB
Markdown
|
```SQL
|
||
|
|
||
|
-- create table datadic_dup as
|
||
|
select *
|
||
|
from datadic_new a
|
||
|
where not exists (
|
||
|
select 's'
|
||
|
from datadic_old b
|
||
|
where a.item = b.item )
|
||
|
and not exists (
|
||
|
select 's'
|
||
|
from datadic_old b
|
||
|
where a.item_ko = b.item_ko )
|
||
|
and not exists (
|
||
|
select 's'
|
||
|
from datadic_sacp b
|
||
|
where a.item = b.item )
|
||
|
and not exists (
|
||
|
select 's'
|
||
|
from datadic_sacp b
|
||
|
where a.item_ko = b.item_ko )
|
||
|
and item_ko not like '%.%'
|
||
|
and item_ko not like '%-%'
|
||
|
and item_ko not like '%,%'
|
||
|
and item_ko not like '%(%'
|
||
|
and item_ko not like '%~%'
|
||
|
and item_ko not like '%/%'
|
||
|
and item_ko not like '%요함'
|
||
|
and item_ko not like '%는'
|
||
|
and item_ko not like '%의'
|
||
|
and item_ko not like '%하다'
|
||
|
and item_ko not like '%의한'
|
||
|
and item_ko not like '%또는%'
|
||
|
and item not in ('UHDT', 'TECR', 'PRFG', 'ENR', 'RTE', 'OCA', 'R', 'VA')
|
||
|
and item not like '%..'
|
||
|
and length(item) <> 1
|
||
|
order by item_ko
|
||
|
|
||
|
|
||
|
update datadic_dup
|
||
|
set crt_date = '2022-11-11'
|
||
|
, useyn = '사용중'
|
||
|
, gbn = '표준어'
|
||
|
|
||
|
|
||
|
select *
|
||
|
from datadic_dup
|
||
|
where length(item) <> 1
|
||
|
order by cast(seq as integer)
|
||
|
|
||
|
|
||
|
```
|