Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.5 kB
2
Indexable
Never
-- 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'
)
Leave a Comment