Re: Here is my problem

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Here is my problem
Date: 2013-08-09 14:38:01
Message-ID: 1376059081534-5766960.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-08-09 14:52:26 Re: Postgres won't start
Previous Message Bèrto ëd Sèra 2013-08-09 14:36:19 Re: bi-directional syncing help request