Please inform what is wrong in this command.
why don't you use sp_executesql rather than exec() ?
If you are trying to construct a string in this manner, make sure that none of the values are NULL. If any one of the variable values are null to start with, the entire SET statement will return a null.