Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Steroids needed
Message
De
01/04/2003 10:12:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Steroids needed
Divers
Thread ID:
00772404
Message ID:
00772404
Vues:
45
I have data with this structure :
checkdate  xclusive id1   id2   nstart  nend
---------- -------- ---   ---   ------  ----
01/01/2003     F     1     1      96     120
01/01/2003     F     1     1     108     120
01/01/2003     F     1     1     108     120
01/01/2003     F     1     1     108     120

01/01/2003     F     2     1      96     108
01/01/2003     F     2     1     102     120
01/01/2003     F     2     1     102     120

01/02/2003     F     2     1      96     108
01/02/2003     F     2     1      96     132
01/02/2003     F     2     1     102     108
01/02/2003     F     2     1     102     120
01/02/2003     F     2     1     102     120
Start,End are in the range 1,186.

What I need is counts for distinct Date,Start,End (ids and xcl matter). There are overlaps in Start/End and I need to split them.

Above samples counts should be as :
checkdate  xclusive id1   id2   nstart  nend  cnts
---------- -------- ---   ---   ------  ----  ----
01/01/2003     F     1     1      96     108    1
01/01/2003     F     1     1     108     120    4

01/01/2003     F     2     1      96     102    1
01/01/2003     F     2     1     102     108    3
01/01/2003     F     2     1     108     120    2

01/02/2003     F     2     1      96     102    2
01/02/2003     F     2     1     102     108    5
01/02/2003     F     2     1     108     120    3
01/02/2003     F     2     1     120     132    1
Any ideas on a fast routine to do this. TIA.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform