Date: Tue, 5 Dec 1995 07:56:35 +0000
Reply-To: The NOMAD2 Discussion List
Sender: The NOMAD2 Discussion List
From: Alan Long
Subject: Re: Creating an array
In-Reply-To: "Mail dated 95/12/04 15:37:54 UT from (TICS28) Alan Long"
Many thanks to all who replied. The solution was to create a dummy
table (b) containing all 1-52 weekno, and initially merge match this with
my original database. I then used create across index all.
from a
create by weekno
by product
qty
merge matching all from b weekno
dummy1
on tempa;
from tempa
create by product
across index all weekno
qty
on tempb keep;
Regards,
Alan
___Original Letter _______________________________________
Date: 04 Dec 1995 15:37:54 +0000
From: Alan Long (TICS28)
To: (NOMAD)
Subject: Creating an array
I have a database with a schema like:
Key product as a8;
Key weekno as 99;
Item qty as 99999;
weekno is the week number with the current week = 1 and with a
maximum value of 52.
I need to create a database from this but with weekno and qty
transformed to an array:
Key product as a8;
Item qty(52) as 99999;
So, for example, data like this:
product weekno qty
ABC 2 1000
ABC 4 2000
produces data like this:
product
ABC qty(1) = N/A qty(2) = 1000 qty(3) = N/A qty(4) = 2000
Is there a simple and elegant way to do this (I can think of some
horrendously clumsy ways!).
Regards,
Alan Long
___End of Original Letter_________________________________
back to index