Thank-you, mystery solved! I was reading the "CREATE TABLE" docs and not
the "CREATE TABLE AS" docs. My mistake.
David Waddy
On Sun, Feb 12, 2012 at 3:50 PM, Adrian Klaver wrote:
> On Sunday, February 12, 2012 11:42:37 am David Waddy wrote:
> > This works:
> > CREATE TEMP TABLE temp_medical_sum
On Sunday, February 12, 2012 11:42:37 am David Waddy wrote:
> This works:
> CREATE TEMP TABLE temp_medical_summary AS (SELECT * from
> bov.medical_summary)
>
> This gives an error:
> CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from
> bov.medical_summary)
>
> It would seem th
This works:
CREATE TEMP TABLE temp_medical_summary AS (SELECT * from
bov.medical_summary)
This gives an error:
CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from
bov.medical_summary)
It would seem that CREATE TABLE AS does not support IF NOT EXISTS. Is this
true?
David Waddy
On 07/25/2011 05:17 PM, David Salisbury wrote:
>
> We all know i can
>
> create table freaky as select "abunchofstuff".
>
> I work with rails developers and they are fussy about having an
> auto incrementing "id" field. Is there a way I can eak that out
> of the above type statement, or am I st
On 26 July 2011 01:17, David Salisbury wrote:
> I work with rails developers and they are fussy about having an
> auto incrementing "id" field. Is there a way I can eak that out
> of the above type statement, or am I stuck with creating the
> table and no short cuts?
>
> create table freaky ( id
We all know i can
create table freaky as select "abunchofstuff".
I work with rails developers and they are fussy about having an
auto incrementing "id" field. Is there a way I can eak that out
of the above type statement, or am I stuck with creating the
table and no short cuts?
create table f
Jacqui Caren-home writes:
> I have inherited an application that populates a number of
> temp.y tables using create table ... as select ...
> As this process hammers the database, I can only run benchmarks at night so
> am asking here if anyone know if
> create table ...; then insert into ... as s
Hi,
On 29 October 2010 11:46, Jacqui Caren-home wrote:
> I have inherited an application that populates a number of
> temp.y tables using create table ... as select ...
What is the principle of creating this temp.y tables?
May be table partitioning is better to implement here -
http://www.postgr
I have inherited an application that populates a number of
temp.y tables using create table ... as select ...
This is taking roughly five to ten minutes to run
As this process hammers the database, I can only run benchmarks at night so
am asking here if anyone know if
create table ...; then ins
On Fri, 12 Dec 2008 13:25:07 +0100
"A. Kretschmer" wrote:
> In response to Ivan Sergio Borgonovo :
> > I just noticed something I found "unexpected".
> >
> > CREATE TABLE LIKE let you specify DEFAULT and Co.
> > CREATE TABLE AS doesn't.
> >
> > Is there a one step way to clone a table?
>
> wit
Andreas K. wrote:
>
> In response to Ivan Sergio Borgonovo :
> > I just noticed something I found "unexpected".
> >
> > CREATE TABLE LIKE let you specify DEFAULT and Co.
> > CREATE TABLE AS doesn't.
> >
> > Is there a one step way to clone a table?
>
> with or without data?
>
> create table ne
In response to Ivan Sergio Borgonovo :
> I just noticed something I found "unexpected".
>
> CREATE TABLE LIKE let you specify DEFAULT and Co.
> CREATE TABLE AS doesn't.
>
> Is there a one step way to clone a table?
with or without data?
create table new_table (like old_table)
create table new_t
I just noticed something I found "unexpected".
CREATE TABLE LIKE let you specify DEFAULT and Co.
CREATE TABLE AS doesn't.
Is there a one step way to clone a table?
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To mak
On Fri, Sep 15, 2006 at 09:42:35PM +0100, garry saddington wrote:
> I am getting a syntax error at or near 'as' in this method, can anyone
> help?
>
> create table iclasses
> (classid serial,
> subject text,
> year text,
> groups text,
> teacher text,
> set text
> )
> as select distinct subject,y
I am getting a syntax error at or near 'as' in this method, can anyone
help?
create table iclasses
(classid serial,
subject text,
year text,
groups text,
teacher text,
set text
)
as select distinct subject,year,groups,teacher,set from interimclasses
I need to make a new table with a classid. Any
> On Fri, Dec 05, 2003 at 13:20:27 -0500,
> Bob Powell <[EMAIL PROTECTED]> wrote:
>
> > SELECT * FROM addresses LEFT OUTER JOIN contacts ON
> > contacts.participant_id = addresses.participant_id;
> >
> > Running the select obviously works fine, it's just when I try to create a
> > table when I
On Fri, Dec 05, 2003 at 13:20:27 -0500,
Bob Powell <[EMAIL PROTECTED]> wrote:
> To whom it may concern,
>
> The following select works fine until I use the CREATE TEMP TABLE AS command because
> of the matching participant_id's in each table.
>
> SELECT * FROM addresses LEFT OUTER JOIN contac
To whom it may concern,
The following select works fine until I use the CREATE TEMP TABLE AS command because
of the matching participant_id's in each table.
SELECT * FROM addresses LEFT OUTER JOIN contacts ON
contacts.participant_id = addresses.participant_id;
Running the select obviously work
i think its:
CREATE TABLE foo AS SELECT number FROM account;
tamsin
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dr. Evil
> Sent: 25 April 2001 23:46
> To: [EMAIL PROTECTED]
> Subject: [GENERAL] CREATE TABLE AS... syntax?
>
>CREATE TABLE foo (test INT4) AS SELECT number FROM account;
I think you want something like:
SELECT number INTO TABLE foo FROM account ;
len morgan
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
I'm trying to use CREATE TABLE AS under 7.03. There are no
examples in the guide, so I tried a few things:
CREATE TABLE foo (test INT4) AS SELECT number FROM account;
and
CREATE TABLE foo (test INT4) AS number FROM account;
and both of them give ERROR: parser: parse error at or near "as".
> Hi,
>
> How do I create a table from a 'select' statement?
> I tried the help from psql '\h create table',
> it does not explain how.
>
> I tried:
>
> create table blah2 as
> select pin from tbs_billing_record
> where date(start_time) between '01-JAN-2000' and '23-JAN-2000'
> order by pin;
S
Chai,
Just miss out the order by, it has no meaning in a table definition.
ie
Create table blah2 as
select pin from tbs_billing_record
where date(start_time) between '01-JAN-2000' and '23-JAN-2000';
Dave
Hi,
How do I create a table from a 'select' statement?
I tried the help from psql '\h create table',
it does not explain how.
I tried:
create table blah2 as
select pin from tbs_billing_record
where date(start_time) between '01-JAN-2000' and '23-JAN-2000'
order by pin;
I received error saying:
24 matches
Mail list logo