Results 1 to 2 of 2

Thread: SQLCMD: call SP add param as contents of a file

Threaded View

  1. #1

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    SQLCMD: call SP add param as contents of a file

    Hi,

    I'd like to use SQLCMD to update my database. I've created a SP and am now trying to figure out how to supply one of the parameters as a variable/contents of a file, is this possible?

    I'm using SQL Server '05

    Code:
    sqlcmd -S server -U uname -P pwd /d mydb -h-1 -s"" -W /Q "exec up_gNewEmail 'This is my subject', 'This is my email body'" -o out.log
    Any help will be greatly appreciated.

    Cheers Al
    Last edited by aconybeare; Jul 22nd, 2010 at 06:48 AM. Reason: Misspelt the command (slap)

Posting Permissions

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



Click Here to Expand Forum to Full Width