General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
What can do is to SELECT for the group and day you need into a cursor then do a SCAN to collect concetive times into an array with the PK of the begining of the time slot...
>Table1
>
>PK reskey resgrp time resused
>========================================
> 1 1 1 0700 F
> 2 1 1 0715 F
> 3 1 1 0745 F
> 4 1 1 0800 T
> 5 2 1 0700 T
> 6 2 1 0715 F
> 7 2 1 0730 F
> 8 10 5 0700 F
> 9 10 5 0715 F
>10 10 5 0730 T
>11 10 5 0745 T
>12 10 5 0800 F <=
>13 10 5 0815 F <=
>14 10 5 0830 F <=
>15 10 5 0845 F <=
>16 10 5 0900 T
>ETC...
>
>I need to be able to query the table for a set of time slots
>that equal some period (example 1 hour) for a given resgrp.
>The time slots have to be together.
>
>select * from table 1
>where resgrp = 5
>and resused=.f.
>and ?
>
>Thanks for any help
>Kirk
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only