Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    New York, NY
    Posts
    136

    Unanswered: parsing output returned by xp_cmdshell

    insert t
    exec master..xp_cmdshell @cmd

    the above will update table t with all the outputs of xp_cmdshell. is there anyway to direct this output to a particular column in t.

    i had just a single varchar(1000) column in t, for which it worked fine. I added another column to t with datatype date time and it has stopped working.

    pl. help

  2. #2
    Join Date
    Jul 2002
    Posts
    58

    Re: parsing output returned by xp_cmdshell

    Originally posted by rohitkumar
    insert t
    exec master..xp_cmdshell @cmd

    the above will update table t with all the outputs of xp_cmdshell. is there anyway to direct this output to a particular column in t.

    i had just a single varchar(1000) column in t, for which it worked fine. I added another column to t with datatype date time and it has stopped working.

    pl. help
    You could always define a view on table 't' that is only the varchar(1000) column, call it 'u' and do this...

    insert u
    exec master..xp_cmdshell @cmd


    Be sure any other columns of 't' are either nullable or have defaults.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •