Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Memory tables
Sat, Mar 24 2007 2:02 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

How do I select into a memory table with ElevateDB?

Roy Lambert
Sat, Mar 24 2007 2:34 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I've now tried


CREATE DATABASE "RAM" IN MEMORY

followed by


CREATE TABLE RAM.RecList AS
(SELECT *
FROM Transactions
WHERE
_Reconciled = False
AND
_fkAccounts = :Account)
WITH DATA

I have a TEDBTable pointing at RecList with the database set to RAM and I get an error when trying to open the table

401 the table or view RecList does not exist

All suggestions welcome or to put it another way HELP!!


Roy Lambert

ps

Trying to cope with two new sets of components (TMS and EBD) is driving me mad Smiley
Mon, Mar 26 2007 8:38 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< CREATE TABLE RAM.RecList AS >>

CREATE TABLE does not allow a database qualifier.  All DDL statements must
be executed within the context of the database in which the object is being
created/altered/dropped.  Only DML statements allow for references to other
databases.

However, it should be issuing an error and it isn't - it's creating the
table in the current database.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Mar 27 2007 3:18 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

><< CREATE TABLE RAM.RecList AS >>
>
>CREATE TABLE does not allow a database qualifier. All DDL statements must
>be executed within the context of the database in which the object is being
>created/altered/dropped. Only DML statements allow for references to other
>databases.
>
>However, it should be issuing an error and it isn't - it's creating the
>table in the current database.

OK so how do I do the equivalent of SELECT * INTO "Memory\Fred"

Roy
Wed, Mar 28 2007 7:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< OK so how do I do the equivalent of SELECT * INTO "Memory\Fred" >>

From the in-memory database that you're created, execute:

CREATE TABLE Fred AS SELECT * FROM MyDatabase.MyTable WITH DATA

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Mar 28 2007 8:35 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


I'm certain that the new memory database system you've designed is more powerful and at least one person will love it, but its less user (ie Roy) friendly.

I suppose at some point I'll get used to it <groan>. The problem is I was spoilt by DBISAM Smiley

Roy Lambert

ps any chance of a WITH INDICES clause?
Thu, Mar 29 2007 6:48 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I'm certain that the new memory database system you've designed is more
powerful and at least one person will love it, but its less user (ie Roy)
friendly. >>

There's no difference apart from the fact that you have to create at least
one in-memory database yourself.  But, once it is created, it is always
there.

<< ps any chance of a WITH INDICES clause? >>

For which statement - the CREATE TABLE statement ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Mar 29 2007 8:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>There's no difference apart from the fact that you have to create at least
>one in-memory database yourself. But, once it is created, it is always
>there.

I originally typed "Yup, but you also have run the query connected to the memory database, and remember to drop the database when finished."

But then I my brain reacted to  "But, once it is created, it is always there." This seems to be the problem I'm having - its always there!


><< ps any chance of a WITH INDICES clause? >>
>
>For which statement - the CREATE TABLE statement ?

CREATE TABLE AS ...
....
....
WITH INDICES

copies them from the original table, saves me the job.

Roy Lambert

Thu, Mar 29 2007 9:58 AMPermanent Link

"Ole Willy Tuv"
Roy,

<< CREATE TABLE AS ...
...
...
WITH INDICES

copies them from the original table, saves me the job. >>

This would probably have lots of implications. The AS <QueryExpression>
clause creates a new table based on the query result set. The query
expression can be anything from a simple single-table query to complex joins
and unions.

I don't like the idea personally, but I'd think the LIKE clause would be a
better option for such a functionality.

Example:

create table2 ( like table1 including indexes )

Ole Willy Tuv

Thu, Mar 29 2007 10:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ole


OK I can go for that and it seems to make more sense than my suggestion

Roy Lambert
Page 1 of 2Next Page »
Jump to Page:  1 2
Image