Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Dynamic Code Question

Status
Not open for further replies.

whateveragain

Programmer
Apr 20, 2009
92
US
The compiler doesn't like the ' * ' as a multiplication sign. How can I write the following statement in dynamic code?

exec('update ' + @tablename + ' set wkcol = (' + @nweight + ' * ' + @columnname + ') where rootkey = ' + @mmkey)
 
All variables must be n/varchar or should be CAST to it. Are you sure @nweight is n/varchar?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top