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 |
|
yoavb
Starting Member
4 Posts |
Posted - 2004-12-06 : 01:13:46
|
| Hello,The following query:SELECT SUM(CASE WHEN MyColumn = @p0 THEN 1 ELSE 0 END) AS c0FROM MyTablereturns an error message "Syntax error or access violation". Why?TIA |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-12-06 : 01:38:04
|
| can't see any problem with the syntax, it must be access violation then.do you have permission to read the table, what's the value of @pO, is it compatible with myColumn?--------------------keeping it simple... |
 |
|
|
yoavb
Starting Member
4 Posts |
Posted - 2004-12-06 : 01:50:23
|
| The almost identical query:SELECT SUM(CASE WHEN MyColumn = 0 THEN 1 ELSE 0 END) AS c0FROM MyTableWorks OK. I'm sending the query from the Data pane of a ReportingServices report in VS.NET 2003, so it should prompt for the parameter value. It doesn't, just complains about this error.Thanks |
 |
|
|
|
|
|