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 |
|
1sabine8
Posting Yak Master
130 Posts |
Posted - 2007-12-12 : 08:57:20
|
| Hi, i have this query in a stored procedure:SELECT Count(new_coursesyname)as CountExCourtesyFROM dbo.FilteredNew_CommentCardWhere new_courtesy = 'Excellent'I need to declare a variable and to set its value equal to CountExCourtesy. How can i do it? What the right syntax? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-12 : 09:01:44
|
[code]DECLARE @CountExCourtesy intSELECT @CountExCourtesy = COUNT(new_coursesyname) AS CountExCourtesyFROM dbo.FilteredNew_CommentCardWHERE new_courtesy = 'Excellent'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|