Re: Is it possible to have an array in a table? (again)
Date: Mon, 31 Aug 2009 22:36:43 -0700 (PDT)
On Sep 1, 12:27 am, joel garry <joel-ga..._at_home.com> wrote:
> On Aug 31, 9:02 pm, Ramon F Herrera <ra..._at_conexus.net> wrote:
> > On Aug 22, 4:07 pm, Ramon F Herrera <ra..._at_conexus.net> wrote:
> > > Can a table contain data arranged in two dimensions, and accessible
> > > through a pair of integer subscripts?
> > > I can live with 1-dimensional arrays, too.
> > > TIA,
> > > -RFH
> > Thanks to everyone for their help...
> > I would like to provide a specific example of what I am trying to
> > accomplish. Let's say I run a circus and every day I get the totals
> > sold in a given week.
> > Categories are: ticket sales, cotton candy, souvenirs, etc.
> > My application needs to display the sales like this:
> > Ticket Sales
> > 8/22/2009: $8492.10
> > 8/15/2009: $9024.31
> > 8/8/2009: $7893.03
> > 8/1/2009: $8945.67
> > People keep on recommending the SQL paradigm, but the above looks to
> > me like something that must be handled by arrays.
> > I need to display the 6 most recent weeks and I keep on pushing the
> > most recent sales figures at the top, while I roll down and eventually
> > drop the oldest data. This kind of think MUST be handled with an
> > index, such as week-1 or week-2.
> > If I followed the relational model, I would need to hardcode records
> > such as:
> > CURRENT_WEEK
> > WEEK_MINUS_1
> > WEEK_MINUS_2
> > etc.
> > That would be a nightmare to code.
> > So, the question is how to implement the records (with arrays?) for a
> > rolling scenario like the above described.
> > Thanks!
> > -Ramon
> This sounds like a job for analytics. They're built into the engine,
> optimizer understands them. Look at the docs, orafaq, asktom for
> many, many examples.
> See here: http://www.oracle.com/technology/obe/obe10gdb/bidw/outerjoin/outerjoi...
> You might remember to state what you are trying to accomplish at the
> start of a thread, rather than ask about how a more primitive
> technology would do it.
> _at_home.com is bogus.
> Is it possible to not be able to shift into neutral while the
> accelerator is jammed wide open?http://www3.signonsandiego.com/stories/2009/aug/31/officer-kin-report...
However, I am not sure that your suggestion is what I need:
- My data is not sparse
- I am not comparing anything
Assume that instead of dollar amounts I have the "Plate of the week". No software can compare dishes. My interest is in shifting a large number of weeks, several years.
The intrinsic nature of the data is tabular, let's say an array of 156 entries (3 years). It would be really easy to shift with indices.
-Ramon Received on Tue Sep 01 2009 - 00:36:43 CDT