This is my SQL command that works
SET @Command = 'REN "C:\Nielsen\' + @FileName + '" "'
+ RIGHT(@FileName,LEN(@FileName)-11) + '"'
I want to replace the C:\Nielsen\ with the value from a variable called @Nielsen
This does not work.....what am I missing?
SET @Command = 'REN ' + @Nielsen + @FileName
+ RIGHT(@FileName,LEN(@FileName)-11) + ''
EDIT
Error message is:
The syntax of the command is incorrect.
@Nielsenand@Filename. Perhaps you need that in your second version as well?Set @Commandline, or when you execute the command you built (you are missing some"and spaces)?