Ratakan

Informations :

How to Copy Account Group Setup from TWO to Other Company


Gunakan instax Insert Table berikut :

Ini akan copy mentah mentah isi data dari table TWO ke Table DEMO

Sintax 
insert into DEMO..FA41300 (
ACCTGRPINDEX ,
ACCTGRPID ,
ACCTGRPDESC ,
DEPREXPACCTINDX ,
DEPRRESVACCTINDX ,
PRIORYRDEPRACCTINDX ,
ASSETCOSTACCTINDX ,
PROCEEDSACCTINDX ,
RECGAINLOSSACCTINDX ,
NONRECGAINLOSSACCTINDX ,
CLEARINGACCTINDX )
select
ACCTGRPINDEX ,
ACCTGRPID ,
ACCTGRPDESC ,
DEPREXPACCTINDX ,
DEPRRESVACCTINDX ,
PRIORYRDEPRACCTINDX ,
ASSETCOSTACCTINDX ,
PROCEEDSACCTINDX ,
RECGAINLOSSACCTINDX ,
NONRECGAINLOSSACCTINDX ,
CLEARINGACCTINDX
from TWO..FA41300

Kemudian gunakan sintax berikut untuk update account index
ini akan menyesuaikan account index Demo dengan TWO :



Sintax 
update a set 
a.DEPREXPACCTINDX = b.ACTINDX_DEMO,
a.DEPRRESVACCTINDX = c.ACTINDX_DEMO,
a.PRIORYRDEPRACCTINDX = d.ACTINDX_DEMO,
a.ASSETCOSTACCTINDX = e.ACTINDX_DEMO,
a.PROCEEDSACCTINDX = f.ACTINDX_DEMO,
a.RECGAINLOSSACCTINDX = g.ACTINDX_DEMO,
a.NONRECGAINLOSSACCTINDX = h.ACTINDX_DEMO,
a.CLEARINGACCTINDX = i.ACTINDX_DEMO

from DEMO..FA41300 a
inner join dbo.ABC_Account_Index_TWO_DEMO b on a.DEPREXPACCTINDX = b.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO c on a.DEPRRESVACCTINDX = c.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO d on a.PRIORYRDEPRACCTINDX = d.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO e on a.ASSETCOSTACCTINDX = e.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO f on a.PROCEEDSACCTINDX = f.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO g on a.RECGAINLOSSACCTINDX = g.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO h on a.NONRECGAINLOSSACCTINDX = h.ACTINDX_TWO
inner join dbo.ABC_Account_Index_TWO_DEMO i on a.CLEARINGACCTINDX = i.ACTINDX_TWO














No comments