Your variable is named different at the end?
Christopher Bellizzi
SQL DBA/Programmer
240 Falls Street
Seneca Falls, NY 13148
Phone: (315) 568-7886
Email: Christopher.[Email address protected]
-----Original Message-----
From: Jumma Salim
[mailto:mssqldba-ezmlmshield-x55187706.[Email address protected]
Sent: Tuesday, February 28, 2006 11:25 AM
To: LazyDBA Discussion
Subject: Job issue almost working
I have set up a job to transfer file
declare @BackupName varchar(200)
Set @BackupName = 'xp_cmdshell'+"'"+'copy' + ' "e:\Microsoft sql
server\MSSQL\Backup\' +'Mydb_' + CONVERT(varchar(8), GETDATE(), 112) +
'2100' + '.BAK"'+
'"\\10.10.10.10\backup\"'+ "'"+ ',no_output'
print @backupName
IT prints the command as I want; but when I do
declare @BackupName varchar(200)
Set @BackupName = 'xp_cmdshell'+"'"+'copy' + ' "e:\Microsoft sql
server\MSSQL\Backup\' +'Mydb_' + CONVERT(varchar(8), GETDATE(), 112) +
'2100' + '.BAK"'+
'"\\10.10.10.10\backup\"'+ "'"+ ',no_output'
@Backup
Give me syntax error what I am doing wrong
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
************************************
This e-mail and any files transmitted with it are proprietary and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of ITT Industries, Inc. The recipient should check this e-mail and any attachments for the presence of viruses. ITT Industries accepts no liability for any damage caused by any virus transmitted by this e-mail.
************************************
MS Sql Server LazyDBA home page