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 |
sariv
Starting Member
1 Post |
Posted - 2009-07-04 : 03:25:42
|
I want to check the count of column , when it group by.Eg . table test has 2 columns a1, b1values a1 b1 1 2 1 1select a1 from test groupby a1select @@rowcountreturns 1But the select result is logged in Log file when i run the job, because of the select statement.I need a solution not to log that select result in Log file.Thanks in advancesariv |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-04 : 03:55:59
|
-- Peso 1declare @items intselect @items = count(*)from (select a1 from test group by a1) AS d-- Peso 2SELECT @Items = COUNT(DISTINCT a1)FROM Test Microsoft SQL Server MVPN 56°04'39.26"E 12°55'05.63" |
|
|
|
|
|