Obsidian/Recognition/Work Related/1.업무메모/2022.03/2022-03-03.md

38 lines
708 B
Markdown

window
x : 2802
y : 192
w : 3145
h : 2072
83651AA000C5G
select cvcod, bujil, bunbr, itnbr, useyn, seqno, pspec
from itmbuy
where cvcod||bunbr||itnbr
in (select cvcod||bunbr||itnbr
from tml_itmbuy_upload )
select cvcod, bujil, bunbr, itnbr, useyn, seqno, pspec
from tml_itmbuy_upload
where cvcod||bunbr||itnbr
not in (select cvcod||bunbr||itnbr
from itmbuy )
insert into ITMBUY(cvcod, bujil, bunbr, itnbr, useyn, seqno, pspec)
select cvcod, bujil, bunbr, itnbr, useyn, seqno, pspec
from tml_itmbuy_upload
where cvcod||bunbr||itnbr||bujil
not in (select cvcod||bunbr||itnbr||bujil
from itmbuy )
DROP INDEX PK_ITMBUY;
CREATE UNIQUE INDEX PK_ITMBUY ON ITMBUY
(CVCOD, SEQNO, ITNBR, PSPEC, BUNBR);