| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hi, I have a name of a person that particiaopte in one or many meeting at different date of the year Name Title Meeting date Eric Rose Reporter 2 feb 2008 Eric Rose Reporter 5 may 2008 I have difficulty in listing name of person only once by grouping into Quarter. If I group the above into fiscal year, then Eric Rose shaow only once but If I group into Quarter, than Eric Rose list once in the first and once in the second quater. How do I count Eric Rose only once in the first querter? SF |
|
#2
|
| Try: select [Name] , count (distinct (datepart (qq, [Meeting date])) from Myable group by [Name] -- Tom ---------------------------------------------------- Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS SQL Server MVP Toronto, ON Canada https://mvp.support.microsoft.com/profile/Tom.Moreau "SF" news:%23Ca60DCCJHA.4884-at-TK2MSFTNGP02.phx.gbl... Hi, I have a name of a person that particiaopte in one or many meeting at different date of the year Name Title Meeting date Eric Rose Reporter 2 feb 2008 Eric Rose Reporter 5 may 2008 I have difficulty in listing name of person only once by grouping into Quarter. If I group the above into fiscal year, then Eric Rose shaow only once but If I group into Quarter, than Eric Rose list once in the first and once in the second quater. How do I count Eric Rose only once in the first querter? SF |
![]() |
| Thread Tools | |
| Display Modes | |