Well, this path seems faster than xtab, i am playing with it now to see if i can do with it...
>BTW, when I read your message originally I was going to suggest exactly the same, but then re-considered.
>
>>Fabio
>>Great idea! Still, not quite there. As you can notice in my sample data, sometimes CTime is unique ( because it happened on Sunday for Fabio in this case ) but sometimes we can have it many times ( 2 patients the same day at the same time )
>>
>>Jaime
>>
>>>>Hi SQL gurus
>>>>I have the following fields:
>>>>CDate(D), CTime (C5), Patient (C30)
>>>>As you may have understood, CDate holds dates, ctime times ( military ) and patient holds names.
>>>>I am trying to get to the following, but since i think i may use only one UNION per select, i don't know if it's possible in one select command:
>>>>
>>>>CTime Sunday Monday Tuesday Wednesday
>>>>----- ------- ------ ------- ---------
>>>>10:00 Sergio Ken Alfred
>>>>10:15 Joseph
>>>>10:15 Kim
>>>>10:30 Fabio
>>>>
>>>>Well, you get the drill...
>>>>
>>>>TIA
>>>>Jaime
>>>
>>>Hi
>>>
>>>* hypothesis : COUNT(DISTINCT CTime,DOW(CDate))<=1
>>>SELECT ;
>>> CTime ;
>>>, MAX(IIF(DOW(CDate)=1,Patient,SPACE(30)))AS Sunday ;
>>>, MAX(IIF(DOW(CDate)=2,Patient,SPACE(30)))AS Monday ;
>>>, MAX(IIF(DOW(CDate)=3,Patient,SPACE(30)))AS Tuesday ;
>>>...
>>> FROM theTable;
>>> GROUP BY 1
>>>* hypothesis : COUNT(DISTINCT CTime,DOW(CDate))>1
>>>* ask me
>>>
Why do programs stop working correctly as soon as you leave the Fox?