--select 'Update prm_mst set prm_mst_lpm_date = '''+cast([LAST PPM] as nvarchar)+''', prm_mst_next_due = '''+cast([NEXT PPM] as nvarchar)+''' where site_cd = ''H07'' and prm_mst_assetno = '''+[Asset No]+''' and prm_mst_pm_no = '''+prm_mst_pm_no+'''', *
--from [0 Nurlaili Ipoh], prm_mst
--where [0 Nurlaili Ipoh].[Asset No] = prm_mst.prm_mst_assetno
--and [LAST PPM] is not null
--order by 4

Update prm_mst set prm_mst_lpm_date = 'Mar  1 2026 12:00AM', prm_mst_next_due = 'Sep  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100612' and prm_mst_pm_no = 'PRM100985'
Update prm_mst set prm_mst_lpm_date = 'Dec  1 2025 12:00AM', prm_mst_next_due = 'Dec  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100613' and prm_mst_pm_no = 'PRM100986'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100614' and prm_mst_pm_no = 'PRM100987'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100615' and prm_mst_pm_no = 'PRM100988'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100616' and prm_mst_pm_no = 'PRM100989'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100617' and prm_mst_pm_no = 'PRM100990'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100618' and prm_mst_pm_no = 'PRM100991'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100619' and prm_mst_pm_no = 'PRM100992'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2025 12:00AM', prm_mst_next_due = 'Jul  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100620' and prm_mst_pm_no = 'PRM100993'
Update prm_mst set prm_mst_lpm_date = 'May  1 2026 12:00AM', prm_mst_next_due = 'May  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100621' and prm_mst_pm_no = 'PRM100994'
Update prm_mst set prm_mst_lpm_date = 'May  1 2026 12:00AM', prm_mst_next_due = 'May  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100622' and prm_mst_pm_no = 'PRM100995'
Update prm_mst set prm_mst_lpm_date = 'Feb  1 2026 12:00AM', prm_mst_next_due = 'Feb  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100625' and prm_mst_pm_no = 'PRM100998'
Update prm_mst set prm_mst_lpm_date = 'Feb  1 2026 12:00AM', prm_mst_next_due = 'Feb  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100626' and prm_mst_pm_no = 'PRM100999'
Update prm_mst set prm_mst_lpm_date = 'Feb  1 2026 12:00AM', prm_mst_next_due = 'Feb  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100627' and prm_mst_pm_no = 'PRM101000'
Update prm_mst set prm_mst_lpm_date = 'Feb  1 2026 12:00AM', prm_mst_next_due = 'Feb  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100628' and prm_mst_pm_no = 'PRM101001'
Update prm_mst set prm_mst_lpm_date = 'Feb  1 2026 12:00AM', prm_mst_next_due = 'Feb  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100629' and prm_mst_pm_no = 'PRM101002'
Update prm_mst set prm_mst_lpm_date = 'Mar  1 2026 12:00AM', prm_mst_next_due = 'Mar  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100935' and prm_mst_pm_no = 'PRM101289'
Update prm_mst set prm_mst_lpm_date = 'Mar  1 2026 12:00AM', prm_mst_next_due = 'Mar  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100941' and prm_mst_pm_no = 'PRM101295'
Update prm_mst set prm_mst_lpm_date = 'Mar  1 2026 12:00AM', prm_mst_next_due = 'Mar  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100943' and prm_mst_pm_no = 'PRM101297'
Update prm_mst set prm_mst_lpm_date = 'Nov  1 2025 12:00AM', prm_mst_next_due = 'Nov  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100945' and prm_mst_pm_no = 'PRM101299'
Update prm_mst set prm_mst_lpm_date = 'Nov  1 2025 12:00AM', prm_mst_next_due = 'Nov  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100946' and prm_mst_pm_no = 'PRM101300'
Update prm_mst set prm_mst_lpm_date = 'Mar  1 2026 12:00AM', prm_mst_next_due = 'Sep  1 2026 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100947' and prm_mst_pm_no = 'PRM101301'
Update prm_mst set prm_mst_lpm_date = 'Jul  1 2026 12:00AM', prm_mst_next_due = 'Jul  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100948' and prm_mst_pm_no = 'PRM101302'
Update prm_mst set prm_mst_lpm_date = 'Apr  1 2026 12:00AM', prm_mst_next_due = 'Apr  1 2027 12:00AM' where site_cd = 'H07' and prm_mst_assetno = 'H07B100955' and prm_mst_pm_no = 'PRM101309'

