Nobody can help you here ..we dont know your data and table definition.
PLease post table defintion along with (sample) data to get the result.
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)