First of all thank to you guys, for propmptly replying to the Query.
I checked out the Execution plan on your suggestion (i generally dont do it, but from now onwards i will firstly look at it always) and found that the index scan was taking too much time.
i created a table with proper indexes and now the Query time has been reduced to 9 seconds from a magnanimous 2 mins 45 sec.
i am still trying on certain more areas to make it more effective.
Thanks a lot again for all your suggestion and replies.