• use this:

    create table #mytmptable (<etc>)

    or the double ##

    as mentioned, if you want "perm" temporary tables for general working purposes, then I would rethink what your trying to do here. Perhaps post your thoughts for further discussion.

    Cheers

    Ck

    Chris Kempster

    http://www.chriskempster.com

    Author of "SQL Server 2k for the Oracle DBA"


    Chris Kempster
    www.chriskempster.com
    Author of "SQL Server Backup, Recovery & Troubleshooting"
    Author of "SQL Server 2k for the Oracle DBA"