From: Michael Glaesemann <grzm@seespotcode.net>
To: novice <user.postgresql@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: populate value of column
Date: Wed, 8 Aug 2007 00:40:20 -0500
Message-ID: <113AAF3D-9E86-4A69-8CDB-5A224C8FC3BE@seespotcode.net> (raw)
In-Reply-To: <ddcb1c340708072230pe7e096bx40fe3e8b348a69de@mail.gmail.com>
References: <ddcb1c340708072230pe7e096bx40fe3e8b348a69de@mail.gmail.com>
On Aug 8, 2007, at 0:30 , novice wrote:
> CREATE TABLE meter
> (
> meter_id integer NOT NULL,
> area_no integer NOT NULL,
> CONSTRAINT meter_pkey PRIMARY KEY (meter_id)
> ) ;
>
> INSERT INTO meter(meter_id, no_of_bays) VALUES (1001, 4);
> INSERT INTO meter(meter_id, no_of_bays) VALUES (1012, 6);
Your insert columns don't match your table.
> How can I generate the following result?
>
> meter_id | bay
> ----------+------------
> 1001 | 01
Your column headers don't match your table definition *or* your
insert statements. I'm not sure what you're trying to do. Can you
explain the result you want? (And in the future, please post actual
DDL and statements.)
Michael Glaesemann
grzm seespotcode net
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: grzm@seespotcode.net, user.postgresql@gmail.com
Subject: Re: populate value of column
In-Reply-To: <113AAF3D-9E86-4A69-8CDB-5A224C8FC3BE@seespotcode.net>
* 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