Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CrazyT
Yak Posting Veteran
73 Posts |
Posted - 2010-07-07 : 17:53:49
|
| simplified version of an issue im having in a sp@string varchar(100),@date datetime,@TableName varchar(30),@Database varchar(30)DECLARE @sql varchar(8000) SET @SQL = 'Insert into ' + @Database + @TableName + '(string, date) Values(' + @String + ',' + @date + ')' EXEC (@SQL)Im trying to pass in a date and keep getting datetime from char conversion errors. i can cast everything as a varchar. is there a better way to get around this? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|