Untitled

Anonymous
plain_text
01/12/2024 6:17 AM
1.9 KB
23
Indexable
-- update masterComponent
update mrms.lg_masterParamSetComponents set 
flagTkb = 0
where id is not null;

-- update flagTkb component aktiva
update mrms.lg_masterParamSetComponents set 
flagTkb = 1
where relationId >= (
	select relationId from mrms.lg_masterParamSetComponents lmpsc 
	where lmpsc.name = 'giro bank indonesia' and componentType = 'aktiva'
) 
and 
relationId <= (
	select relationId from mrms.lg_masterParamSetComponents lmpsc 
	where lmpsc.name = 'tagihan akseptasi' and componentType = 'aktiva'
)

-- update flagTkb component pasiva
update mrms.lg_masterParamSetComponents set 
flagTkb = 1
where relationId >= (
	select relationId from mrms.lg_masterParamSetComponents lmpsc 
	where lmpsc.name = 'giro' and componentType = 'pasiva'
) 
and 
relationId <= (
	select relationId from mrms.lg_masterParamSetComponents lmpsc 
	where lmpsc.name = 'kewajiban lain-lain' and componentType = 'pasiva'
)

-- update flagTkb in paramComponent
update mrms.lg_paramSetComponents set 
flagTkb = 0
where id is not null;

-- update flagTkb component aktiva
update mrms.lg_paramSetComponents set 
flagTkb = 1
where relationId >= (
	select min(relationId) from mrms.lg_paramSetComponents lmpsc 
	where cast(lmpsc.name as varchar) = 'giro bank indonesia' and componentType = 'aktiva'
) 
and 
relationId <= (
	select max(relationId) from mrms.lg_paramSetComponents lmpsc 
	where cast(lmpsc.name as varchar) = 'tagihan akseptasi' and componentType = 'aktiva'
)
Editor is loading...
Leave a Comment