Hello -
I have some data that I need to count for upper management...
Sample data:
USERID
ntlocal://COM0004775/SYSTEM
ntlocal://COM0004073/SYSTEM
ntlocal://COM0004775/SYSTEM
ntlocal://COM0004775/SYSTEM
ntlocal://COM0004377/SYSTEM
ntlocal://COM0004073VM1/SYSTEM
now, I need a count of each machine (ntlocal://com#####/system), but there
the duplicates are screwing my results...I have tried distinct, but that
does not help...
Select cast(count(userid) as varchar(10))
from <table>
where userid like 'ntlocal%'
any help would be appreciated!
Cory
MS Sql Server LazyDBA home page