Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Create Table As
Tue, Jul 24 2007 12:37 PMPermanent Link

Michael Thompson
I am running a remote session and execute this query

CREATE TABLE "TabletsCapsules"
AS (SELECT * FROM "Drugs" WHERE Form1 = 'TABLET')

It creates the table fine but no data is in the table. Is there something I am missing about EDB?
Tue, Jul 24 2007 1:43 PMPermanent Link

"Harry de Boer"
Michael,

I think you must use "WITH DATA"

Regards, Harry

"Michael Thompson" <cross7@roadrunner.com> schreef in bericht
news:93463353-B5A8-4E88-98C1-23F9378800A8@news.elevatesoft.com...
> I am running a remote session and execute this query
>
> CREATE TABLE "TabletsCapsules"
> AS (SELECT * FROM "Drugs" WHERE Form1 = 'TABLET')
>
> It creates the table fine but no data is in the table. Is there something
I am missing about EDB?
>

Tue, Jul 24 2007 1:57 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Michael


WITH DATA


Roy Lambert
Tue, Jul 24 2007 4:08 PMPermanent Link

Michael Thompson
Thanks, Roy and Harry

That worked...

Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Michael


WITH DATA


Roy Lambert
Tue, Jul 24 2007 4:51 PMPermanent Link

"Ole Willy Tuv"
Michael,

<< It creates the table fine but no data is in the table. Is there something
I am missing about EDB? >>

Like others have pointed out, you need to add WITH DATA.

The WITH DATA|WITH NO DATA clause is implemented as optional in EDB
(obviously making WITH NO DATA the default), which is a deviation from
SQL:2003 where the clause is required. IMO, it makes sense (less confusing)
to follow the standard specification here. Tim ?

Ole Willy Tuv

Wed, Jul 25 2007 3:59 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< The WITH DATA|WITH NO DATA clause is implemented as optional in EDB
(obviously making WITH NO DATA the default), which is a deviation from
SQL:2003 where the clause is required. IMO, it makes sense (less confusing)
to follow the standard specification here. Tim ? >>

I didn't catch that it was required in the syntax diagrams since I was using
a 2003 extensions "cheat sheet". Smiley I will see about changing that.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image