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 |
|
fubuki99
Starting Member
10 Posts |
Posted - 2009-05-03 : 23:50:20
|
| Hello,I'm getting error "invalid column name count" when I try to count the value from a column and return the output that is more than 2 from the below statement. How do I get this result to return the output?select cos, count(*)as totalfrom acfbs_coswhere count >2Msg 207, Level 16, State 1, Line 2Invalid column name 'count'. |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-05-03 : 23:58:16
|
| You can't use count as a column name....Can't say much without seeing sample data...but maybe this..SELECT cos,COUNT(cos) FROM acfbc_cosGROUP BY cosHAVING COUNT(cos) > 2 |
 |
|
|
|
|
|