>CTime Sunday Monday Tuesday Wednesday >----- ------- ------ ------- --------- >10:00 Sergio Ken Alfred >10:15 Joseph >10:15 Kim >10:30 Fabio >>Well, you get the drill...
* hypothesis : COUNT(DISTINCT CTime,DOW(CDate))<=1 SELECT ; CTime ; , MAX(IIF(DOW(CDate)=1,Patient,SPACE(30)))AS Sunday ; && ,CAST(NULL AS C(30)) if you want NULL , MAX(IIF(DOW(CDate)=2,Patient,SPACE(30)))AS Monday ; && ,CAST(NULL AS C(30)) if you want NULL , MAX(IIF(DOW(CDate)=3,Patient,SPACE(30)))AS Tuesday ; && ,CAST(NULL AS C(30)) if you want NULL ... FROM theTable; GROUP BY 1 * hypothesis : COUNT(DISTINCT CTime,DOW(CDate))>1 * ask me