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 |
|
A. Kucuk
Starting Member
2 Posts |
Posted - 2010-05-06 : 04:34:20
|
| Removed on request |
|
|
apodemus
Starting Member
30 Posts |
Posted - 2010-05-06 : 04:52:20
|
| try to use count(distinct snumber) SELECT RelatieId, Jaar, Sofinummer, (select COUNT(distinct Sofinummer) from Leaseproces.dbo.Relatie_BDVeld RB where RelatieId = Leaseproces.dbo.Relatie_BDVeld.RelatieId and Jaar = Leaseproces.dbo.Relatie_BDVeld.Jaar)FROM Leaseproces.dbo.Relatie_BDVeldGROUP BY RelatieId, Jaar, Sofinummerapodemus |
 |
|
|
apodemus
Starting Member
30 Posts |
Posted - 2010-05-06 : 04:53:57
|
| or if you don't need info about Sofinummer/snumber you can querySELECT RelatieId, Jaar, COUNT(distinct Sofinummer)FROM Leaseproces.dbo.Relatie_BDVeldGROUP BY RelatieId, Jaarapodemus |
 |
|
|
A. Kucuk
Starting Member
2 Posts |
Posted - 2010-05-06 : 05:57:08
|
| edit: removed on request |
 |
|
|
apodemus
Starting Member
30 Posts |
Posted - 2010-05-06 : 07:35:17
|
| you're welcomeapodemus |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-04 : 04:19:48
|
quote: Originally posted by A. Kucuk Removed on request
who request you to remove the original question?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|