Sequential Period generator?
Thomson, Martyn EDUC:EX
martyn.thomson@gems1.gov.bc.ca
Wed, 02 Aug 2000 10:07:13 -0700
Thanks all who responded.
Andreas's approach looks much like what I had done so far - create an
indexed subfile of the periods with a dummy index and then link the
UWI_RANGE table to it. The only difference - I first run a request to
determine the maximum range of periods, so I could reduce the number of rows
in the temp01 periods subfile.
As to why I don't want to use batch Quick to do this, I don't really have an
answer, other than a gut feeling that QTP is the right tool for the job and
unease using an unsupported "feature" if I can avoid it. There's also
rollback recovery, and it's useful to see the transaction statistics in the
log. As to speed, I will be benchmarking the two methods later - I am
supposed to be making this job faster!
Martyn
-----Original Message-----
From: andreasa@scicom.gr [mailto:andreasa@scicom.gr]
Sent: Wednesday, August 02, 2000 10:39 AM
To: Thomson, Martyn EDUC:EX
Cc: Powerh-L (E-mail)
Subject: RE: Sequential Period generator?
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.
Hello all
Can anybody suggest a simple QTP strategy to accomplish the following -
I have a table UWI_RANGE which contains an Id field, and start and end
periods in the format YYYYMM -char(6).
I need to populate another table UWI_PERIODS which contains the same ID
field and a PERIOD char(6) - creating one record for each month in the range
for the ID. Currently this is done by a 'while retrieving' loop in a batch
Quick screen, but I would like to rewrite it in QTP.
There is another table DB_PERIODS available which contains a field DB_PERIOD
char(6) and has a row for every period ever used. Perhaps this can be linked
to in some way and a SELECT statement used to limit the transaction set to
the period range?
Any help with this much appreciated.
Martyn
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.