Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement