If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Creating a timeline

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-04-10, 02:00
mac1984 mac1984 is offline
Registered User
 
Join Date: Jul 2010
Posts: 4
Creating a timeline

Hello,

Can anyone give me some advice on how to create a timeline in sql?

I work in the nhs and I am trying to create a timeline of clinician's activities. Ideally it will show each minute between the two dates as a row and then count whether the clinican was working that minute (based on the consultation start and end dates).

So it would be between the @fromdate and the @todate, eg/ 18:00 to 18:02

and would result something like:

Time | With Patient
18:00 | 1
18:01 | 1
18:02 | 0

Is this possible? Any help would be greatly appreciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 07-04-10, 02:53
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
does this need to be solely in MySQL, or can you do some of the processing in another (frotn end tool/app language)

you may be able to generate the non patient time by JOINing to another table whihc has 0..59 in it and JOIN using the minute of the form/todates
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On