Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Problem creating table from Query (Result set)
Tue, May 28 2013 11:06 PMPermanent Link

Adam H.

Hi,

I'm trying to create a table using the result set from a query on
another table, but can't figure out where I've gone wrong:

create Table "_Tmp2" as
select distinct T.Field1, T.Field2, T.Field3
From _TMP T

I've also tried as a script:

SCRIPT
BEGIN
EXECUTE IMMEDIATE'
create Table "_Tmp2" as
select distinct T.Field1, T.Field2, T.Field3
From _TMP T';
END;

Both times I get the error #700 (Missing WITH)

I know it's simple, but I guess I'm still stuck in DBISam's Select ...
into methods.

Cheers

Adam.
Wed, May 29 2013 2:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam

create Table "_Tmp2" as
select distinct T.Field1, T.Field2, T.Field3
From _TMP T

WITH DATA

Roy Lambert [Team Elevate]
Wed, May 29 2013 7:35 PMPermanent Link

Adam H.

Oh Roy - is that it. I feel like such a noob!

Thanks for your help!

Adam.

> Adam
>
> create Table "_Tmp2" as
> select distinct T.Field1, T.Field2, T.Field3
>  From _TMP T
>
> WITH DATA
>
> Roy Lambert [Team Elevate]
>
Mon, Jun 24 2013 4:07 PMPermanent Link

Ben Sprei

CustomEDP

How about using

create Table "_Tmp2" like
"TMP T"


"Adam H." <ahairsub5@removeme.jvxp.com> wrote in message
news:085241B5-E338-489E-8367-734378999AE0@news.elevatesoft.com...
> Oh Roy - is that it. I feel like such a noob!
>
> Thanks for your help!
>
> Adam.
>
>> Adam
>>
>> create Table "_Tmp2" as
>> select distinct T.Field1, T.Field2, T.Field3
>>  From _TMP T
>>
>> WITH DATA
>>
>> Roy Lambert [Team Elevate]
>>
>

Image