Hi Raghu,
I tried using the same script mentioned by you but it didnt work in my case.
However, I wanted to point out that I am using the exact similar function on case table - sn_customerservice_case which belongs to the Customer Service Application...