I want to test this how do i test this after being updated .Please anyone can help me with the query ..
Scenario The new logic for new_draw_period_qt and old_lotto_term_qt did not take into account zero values in the coalesce statement. This is to fix the historical problem new_draw_period_qt and old_lotto_term_qt and set the zero values to null .The historical update is for wherenew_draw_period_qt/old_lotto_term_qt equal zero and for the month starting in April 2018.
--update lotto accounts where new_accoun.new_draw_period_dt= 0 to null
--update old_account.old_lotto_term_qt = 0 to null
update a
set a.new_draw_period_qt=
case when a.new_draw_period_qt=0 or a.filedate>='20180401' then null else a.new_draw_period_qt end,
case when a.old_lotto_term_qt=0 or a.filedate>='20180401' then null else a.old_lotto_term_end
from database.dbo.new_account as a
join database.dbo.resolution as c
on a.lottery=c.lotto_no
where c.lottery_cd in ('7','8')
Aucun commentaire:
Enregistrer un commentaire