>thanx Cetin,
>
>but could u also highlight me on how to create temp tables or cursors return the recordset and then drop them ?
>
>thanx
>suhas
Prefix the tablename with 2 sharps :
create table ##myTable ...
insert into ##myTable ...
It'd be destroyed when it goes out of scope (typically when stored proc ends) . Also check for global temporary tables that are created with a single sharp prefix. They are available to other sessions other than current session and destroyed when all the referees in all sessions has ended.
Cetin