Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Accessing MEMORY table created by Query1 in Query2
Wed, Jun 27 2007 11:35 AMPermanent Link

Adam
I have a complex SQL script which creates 5 tables in memory.

The next part aggregates the data from the 5 memory tables. This last part is very quick,
together the first sections are quite slow, but OK.

Users often want to re-run the last part with different criteria: ORDER BY, FILTER etc.

I don't want to rerun the whole script for each new ORDER BY, FILTER etc.

--

If I split the script in 2 is it possible for the second Query object to access the MEM
tables created in the first query?

I know I cannot create locally saved tables in ClientServer ...

DBISAM 4 CS, Delphi 2007.

Adam x
Wed, Jun 27 2007 2:38 PMPermanent Link

"Robert"

"Adam" <adam@NOSPAMPLEASEfullwellmill.co.uk> wrote in message
news:A9AF5A8D-DF11-4BFB-95CC-3D426BC2D446@news.elevatesoft.com...
>I have a complex SQL script which creates 5 tables in memory.
>
> The next part aggregates the data from the 5 memory tables. This last part
> is very quick,
> together the first sections are quite slow, but OK.
>
> Users often want to re-run the last part with different criteria: ORDER
> BY, FILTER etc.
>
> I don't want to rerun the whole script for each new ORDER BY, FILTER etc.
>
> --
>
> If I split the script in 2 is it possible for the second Query object to
> access the MEM
> tables created in the first query?
>

Yes it is. "memory\" is a database available to your session.  Of course, if
the last result is also a memory table, you can avoid having to recreate it.
Create the appropriate indexes, and just change the indexname when you want
to display the data in a different sequence.

> I know I cannot create locally saved tables in ClientServer ...
>

Yes you can, but that's another story.

Robert


Thu, Jun 28 2007 11:51 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< If I split the script in 2 is it possible for the second Query object to
access the MEM tables created in the first query? >>

Sure, no problem.  In-memory tables stick around until you delete them.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image