I am currently trying to optimize sql code. I would like to know if there is an alternate way of writing these statements, because it seems take a good deal of time to complete.
Update #TMP---updates webid when its null in tmp table
Set #TMP.webid_Val='NOT COMPLIANT'
Where #TMP.webid is null
Update #TMP---updates PID when its null in tmp table
Set #TMP.PID_Val='NOT COMPLIANT'
Where #TMP.Pid is null
Update #TMP---Shifts multiple fob situations into storewide
Set #TMP.GMM ='Storewide'
Where #TMP.gmm like '%, %';
Update #TMP-----Shifts marketing into multiple fob situation
Set #TMP.GMM ='Storewide'
Where #TMP.gmm like 'Marketing%'
Update #TMP
Set #TMP.OVERALL_Val='NOT COMPLIANT'
Where #TMP.webid is null
This does have over 22,000 entries.