Home Forums SQL Server 2005 T-SQL (SS2K5) Create #Temp Table using While Loop Instead of Cursor RE: Create #Temp Table using While Loop Instead of Cursor

  • check if you are looking something like below....if not, post table defintions ,sample data and expected results to get faster and accurate responses.

    if object_id('tempdb..#test123') is not null

    drop table #test123

    SELECT id1 = IDENTITY( int,1,1),table_name,COLUMN_NAME, DATA_TYPE, IS_NULLABLE

    into #test123 FROM INFORMATION_SCHEMA.COLUMNS

    select * from #test123

    -- Jus

    -----------------------------------------------------------------------
    For better assistance in answering your questions[/url]
    Perforamance Issues[/url]
    Cross Tabs and Pivots[/url]
    Cross Apply[/url]
    The Numbers or Tally Table- Jeff Moden[/url]