아래와 같이 조인으로 결과셋을 얻은 값에서
select playtime,total_play_time from TBL_STAT_LECT_COMPLETE_LOG c
join
(
select cm_subnum ,cm_contents_num,isnull(sum(cast(play_time as int)),0) total_play_time from TBL_STAT_STUDY_LOG group by cm_subnum ,cm_contents_num,M_HAKBUN
having M_HAKBUN='APA-HN-55'
) x on c.cm_subnum=x.cm_subnum
where M_HAKBUN='APA-HN-55'
update table playtime = total_play_time 와 같은 업데이트문을 구사하려면 어떻게 해야하는지요?
고수님들의 조언 부탁드려요 |