«« Next » « Previous
«« Next » « Previous

Link Details

Link 80270 thumbnail

By mswatcher
via sqlblog.com
Submitted: May 10 / 03:34

This question came up today and here is one way of doing it. It requires running xp_cmdshell so this is probably not such a good idea. The problem with functions is that you cannot just insert into any table. INSERT, UPDATE, and DELETE statements modifying table variables local to the function. EXECUTE statements calling an extended stored procedures are allowed. So with this in mind we know that we can call xp_cmdshell, from xp_cmdshell we can use osql
  • 4
  • 0
  • 87
  • 12

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (4)



Voters Against This Link (0)