Sequential Period generator?

=?iso-8859-7?Q?=C1=D1=C3=D5=D1=C9=CF=D5_=C1=CD=C4=D1=C5=C1=D3?= andreasa@scicom.gr
Wed, 2 Aug 2000 18:38:48 +0100


Hello Martyn,

Here is a solution along the lines of your original idea i.e. access
UWI_RANGE and link to DB_PERIODS.
I assume that DB_PERIOD is the only field in DB_PERIODS.

request r01
access DB_PERIODS

temp ww char*1
item ww init " "

subfile temp01 include ww, DB_PERIOD index temp01_k unique segment ww,
DB_PERIOD

request r02
access UWI_RANGE link " " viaindex temp01_k to ww of *temp01

select temp01 if start_period of UWI_RANGE <= DB_PERIOD of temp01 &
  and DB_PERIOD of temp01 <= end_period of UWI_RANGE

output UWI_PERIODS add
item id_field   final id_field of UWI_RANGE
item PERIOD final DB_PERIOD of temp01


The first request is not necessary if you already have a field containing
the same value for all records in DB_PERIODS
and this field is the first segment in an index.

Also if you have such a field in UWI_RANGE then you can access DB_PERIODS
and link to UWI_RANGE and sort
appropriately.

Hope this will help

Andreas Argyriou
Scicom S.A.
Athens, Greece
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.