Result into Table

  • Dear All,

    I nead the result of this command in a table.How can i do this.

    RESTORE FILELISTONLY FROM disk='F:\Backup Database(Full)\gg.bkp'

    Thanx for ur Help

    from

    Killer

  • declare @sql as varchar(5000)

    set @sql = 'RESTORE FILELISTONLY FROM disk=''U:\MSSQL\backup\masterfull.bak'''

    create table #tmpFilelist ( LogicalName nvarchar(128)

     , PhysicalName nvarchar(260)

     , [Type] char(1)

     , FileGroupName nvarchar(128)

     , [Size] numeric(20)

     , [MaxSize] numeric(20)

    &nbsp

    insert into #tmpFilelist

    exec (@sql)

    select *

    from #tmpFilelist

    -- drop table #tmpFilelist

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Nice one.Thanx

    from

    Killer

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply