INSERT with SELECT not working in pgAdmin

From: Stefan Wild <wilds81(at)yahoo(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: INSERT with SELECT not working in pgAdmin
Date: 2010-09-20 19:19:05
Message-ID: 715492.32171.qm@web26702.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

I'm trying to merge two tables to one with INSERT and SELECT commands:

INSERT into c_transactions (timestamp) SELECT entrytimestamp from c_transactions

INSERT into c_transactions (timestamp) SELECT exittimestamp from c_transactions

But getting this error on execution (in pgAdmin): "ERROR: null value in column "id" violates not-null constraint
SQL Status:23502"

What I'm doing wrong or is there another possibility for table merging?

I'm using postgres 8.3.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aram Fingal 2010-09-20 19:20:59 Re: Installing Contrib Modules with a Precompiled Binary
Previous Message Colin 't Hart 2010-09-20 19:18:09 Re: to_date conversion semantics?