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 |
|
Adam Maras
Starting Member
6 Posts |
Posted - 2007-08-09 : 11:36:28
|
| I have a simple dynamic SQL statement I want to run as a Computed Column Specification, but SQL Server 2005 doesn't seem to like it, no matter what I do with it. The statement is an EXECUTE statement with a string literal. When I C&P it into a query and swap out the column names for literal values, it works perfectly. Is it simply not possible to run an EXECUTE command in a CCS?Thanks. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-09 : 11:52:20
|
| can you post the code?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
Adam Maras
Starting Member
6 Posts |
Posted - 2007-08-09 : 11:54:30
|
| EXECUTE ('SELECT CAST(' + Data + ' AS ' + DataType + ')')Data is varbinary(MAX) and DataType is varchar(16) (and I know that it will have valid entries for data types.) |
 |
|
|
|
|
|