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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL queries using count

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-04-30 : 13:58:31
Vanisha writes "Is it possible to use to 2 count signs in one query"

nr
SQLTeam MVY

12543 Posts

Posted - 2004-04-30 : 14:30:07
Probably.
What do you mean?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

vijayakumar_svk
Yak Posting Veteran

50 Posts

Posted - 2004-05-03 : 01:37:49
It is possible.

select count(*),count(distinct name) from tbl

Work smarter not harder take control of your life be a super achiever
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-05-03 : 01:46:23
Yes.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-03 : 01:58:28
Try it and see? Always a good method for finding out things.
Can use sysobjects for this.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -