From: David Johnston <polobo@yahoo.com>
To: pgsql-general@postgresql.org
Subject: Re: Here is my problem
Date: Fri, 9 Aug 2013 07:38:01 -0700 (PDT)
Message-ID: <1376059081534-5766960.post@n5.nabble.com> (raw)
In-Reply-To: <1376058047506-5766954.post@n5.nabble.com>
References: <1376058047506-5766954.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Basavaraj wrote
> Now i want to insert data to the table....
> the format should be
>
> id | marks
> ----------
> 1 |50
> 1 |30
> 1 |30
> ....
> ....
> 2 |...
> ....
>
> the actual query is
>
> insert into table(id,marks) values(1,unnest(array[marks]))
>
>
> But we should not use array and unnest but i want in this format
>
> pls help..
Use the
INSERT INTO tbl (...)
SELECT *
FROM src
form of insert to build and insert an entire dynamic result.
DavidJ.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Here-is-my-problem-tp5766954p5766960.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: polobo@yahoo.com
Subject: Re: Here is my problem
In-Reply-To: <1376059081534-5766960.post@n5.nabble.com>
References: <1376058047506-5766954.post@n5.nabble.com> <1376059081534-5766960.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox