select into...

select into...

am 17.03.2009 00:08:48 von Tena Sakai

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9A68C.29F2199A
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Everybody,

I want to execute a query below:

select *
into my_table
from old_table
where (some_condition);

The trouble is that the manual page states that this would
"SELECT INTO creates a new table and fills it with data
computed by a query."

What I want is to append my_table. Is there any way to
get postgres to do what I want done?

Thank you in advance.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu


------_=_NextPart_001_01C9A68C.29F2199A
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




charset=3Diso-8859-1">
6.5.7654.12">
select into...




Hi Everybody,



I want to execute a query below:



  select *

    into my_table

    from old_table

   where (some_condition);



The trouble is that the manual page states that this would

"SELECT INTO creates a new table and fills it with data

computed by a query."



What I want is to append my_table.  Is there any way to

get postgres to do what I want done?



Thank you in advance.



Regards,



Tena Sakai

tsakai@gallo.ucsf.edu








------_=_NextPart_001_01C9A68C.29F2199A--

Re: select into...

am 17.03.2009 00:12:05 von Scott Marlowe

On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai wrote:
> Hi Everybody,
>
> I want to execute a query below:
>
> =A0 select *
>   =A0 into my_table
>   =A0 from old_table
>    where (some_condition);
>
> The trouble is that the manual page states that this would
> "SELECT INTO creates a new table and fills it with data
> computed by a query."
>
> What I want is to append my_table.=A0 Is there any way to
> get postgres to do what I want done?

You want insert:

insert into my_table select yada from old_table;

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: select into...

am 17.03.2009 00:13:07 von Kevin Grittner

>>> "Tena Sakai" wrote:
> What I want is to append my_table. Is there any way
> to get postgres to do what I want done?

PostgreSQL supports the SQL standard syntax for this:

insert into my_table
select *
from old_table
where (some_condition);

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: select into...

am 17.03.2009 00:13:16 von Fernando Arancibia

--000e0cd4050c73edc90465449830
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi, try
insert into my_table select * from old_table where (some_condition);

bye
Fernando.

2009/3/16 Tena Sakai

> Hi Everybody,
>
> I want to execute a query below:
>
> select *
> into my_table
> from old_table
> where (some_condition);
>
> The trouble is that the manual page states that this would
> "SELECT INTO creates a new table and fills it with data
> computed by a query."
>
> What I want is to append my_table. Is there any way to
> get postgres to do what I want done?
>
> Thank you in advance.
>
> Regards,
>
> Tena Sakai
> tsakai@gallo.ucsf.edu
>
>

--000e0cd4050c73edc90465449830
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi, try


insert into=A0my_table select * from=A0old_table=
=A0where (some_condition);

bye=A0
Fernan=
do.

2009/3/16 Tena Sakai "><>=
;


x #ccc solid;padding-left:1ex;">









Hi Everybody,



I want to execute a query below:



=A0 select *

  =A0 into my_table

  =A0 from old_table

   where (some_condition);



The trouble is that the manual page states that this would

"SELECT INTO creates a new table and fills it with data

computed by a query."



What I want is to append my_table.=A0 Is there any way to

get postgres to do what I want done?



Thank you in advance.



Regards,



Tena Sakai

tsakai@gallo.ucs=
f.edu











--000e0cd4050c73edc90465449830--

Re: select into...

am 17.03.2009 00:16:57 von Tena Sakai

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9A68D.63A1BB5C
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Many thanks, Scott.

Tena Sakai


-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Mon 3/16/2009 4:12 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] select into...
=20
On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai =
wrote:
> Hi Everybody,
>
> I want to execute a query below:
>
> =A0 select *
>   =A0 into my_table
>   =A0 from old_table
>    where (some_condition);
>
> The trouble is that the manual page states that this would
> "SELECT INTO creates a new table and fills it with data
> computed by a query."
>
> What I want is to append my_table.=A0 Is there any way to
> get postgres to do what I want done?

You want insert:

insert into my_table select yada from old_table;


------_=_NextPart_001_01C9A68D.63A1BB5C
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




charset=3Diso-8859-1">
6.5.7654.12">
RE: [ADMIN] select into...




Many thanks, Scott.



Tena Sakai





-----Original Message-----

From: Scott Marlowe [ HREF=3D"mailto:scott.marlowe@gmail.com">mailto:scott.marlowe @gmail.com >]

Sent: Mon 3/16/2009 4:12 PM

To: Tena Sakai

Cc: pgsql-admin@postgresql.org

Subject: Re: [ADMIN] select into...



On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai =
<tsakai@gallo.ucsf.edu> wrote:

> Hi Everybody,

>

> I want to execute a query below:

>

> =A0 select *

>   =A0 into my_table

>   =A0 from old_table

>    where (some_condition);

>

> The trouble is that the manual page states that this would

> "SELECT INTO creates a new table and fills it with data

> computed by a query."

>

> What I want is to append my_table.=A0 Is there any way to

> get postgres to do what I want done?



You want insert:



insert into my_table select yada from old_table;








------_=_NextPart_001_01C9A68D.63A1BB5C--

Re: select into...

am 17.03.2009 00:31:10 von Tena Sakai

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9A68F.6509E69B
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thank you, Fernando.
Thank you, Kevin.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Fernando Arancibia [mailto:farancibia@iswitch.cl]
Sent: Mon 3/16/2009 4:13 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] select into...
=20
Hi, try
insert into my_table select * from old_table where (some_condition);

bye
Fernando.

2009/3/16 Tena Sakai

> Hi Everybody,
>
> I want to execute a query below:
>
> select *
> into my_table
> from old_table
> where (some_condition);
>
> The trouble is that the manual page states that this would
> "SELECT INTO creates a new table and fills it with data
> computed by a query."
>
> What I want is to append my_table. Is there any way to
> get postgres to do what I want done?
>
> Thank you in advance.
>
> Regards,
>
> Tena Sakai
> tsakai@gallo.ucsf.edu
>
>


------_=_NextPart_001_01C9A68F.6509E69B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




charset=3Diso-8859-1">
6.5.7654.12">
RE: [ADMIN] select into...




Thank you, Fernando.

Thank you, Kevin.



Regards,



Tena Sakai

tsakai@gallo.ucsf.edu





-----Original Message-----

From: Fernando Arancibia [
HREF=3D"mailto:farancibia@iswitch.cl">mailto:farancibia@iswi tch.cl] R>
Sent: Mon 3/16/2009 4:13 PM

To: Tena Sakai

Cc: pgsql-admin@postgresql.org

Subject: Re: [ADMIN] select into...



Hi, try

insert into my_table select * from old_table where (some_condition);



bye

Fernando.



2009/3/16 Tena Sakai <tsakai@gallo.ucsf.edu>



>  Hi Everybody,

>

> I want to execute a query below:

>

>   select *

>     into my_table

>     from old_table

>    where (some_condition);

>

> The trouble is that the manual page states that this would

> "SELECT INTO creates a new table and fills it with data

> computed by a query."

>

> What I want is to append my_table.  Is there any way to

> get postgres to do what I want done?

>

> Thank you in advance.

>

> Regards,

>

> Tena Sakai

> tsakai@gallo.ucsf.edu

>

>








------_=_NextPart_001_01C9A68F.6509E69B--