On Wed, 10 Aug 2005 05:03:47 +0200, tgh002 <[EMAIL PROTECTED]> wrote:
I am using a insert statement like:
INSERT INTO newtable
SELECT field1, field2 FROM anothertable
newtable structure is: serial, varchar, varchar
What syntax do I use to insert the serial field? Ive tried something
like:
"tgh002" <[EMAIL PROTECTED]> writes:
> I am using a insert statement like:
> INSERT INTO newtable
> SELECT field1, field2 FROM anothertable
> newtable structure is: serial, varchar, varchar
> What syntax do I use to insert the serial field?
I think you want to just let it default, which you'd do
I am using a insert statement like:
INSERT INTO newtable
SELECT field1, field2 FROM anothertable
newtable structure is: serial, varchar, varchar
What syntax do I use to insert the serial field? Ive tried something
like:
INSERT INTO newtable
SELECT nextval('newtable_id_seq'), field1, field2 FRO
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Monday 11 August 2003 03:21, Silke Trissl wrote:
>
> Is there something like
>
> INSERT INTO test_table (int_id, cust_id, cust_name) '1', SELECT id,
> name from CUSTOMER:
>
> and if so, what ist the correct statement? If not, what is an
> alternativ
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Silke Trissl) would write:
> I would like to insert into a table values from a table and user
> defined ones. Here is the example:
>
> I found this statement to insert values from another table:
>
> INSERT INTO test_table (cust_id, cust_nam
Coincidentally, I have a very similar case using some twists.
The table I want to insert data is something like
table A (
user01 int,
user02 int,
...
primary key (user01, user02),
CHECK ( user01 < user02 )
);
And the user table is:
tabe user_table (
user int constraint pk_user primary key UNIQ
>
> Coincidentally, I have a very similar case using some twists.
>
> The table I want to insert data is something like
>
> table A (
> user01 int,
> user02 int,
> ...
> primary key (user01, user02),
> CHECK ( user01 < user02 )
> );
>
> And the user table is:
>
> tabe user_table (
> user int constr
Thanks, Christoph for your thought.
An alternative solution I have is to fetch the user table first and act according with
the retured value. It doesn't seem to have a single query solution.
v.
--
- Original Message -
DATE: Wed, 13 Aug 2003 13:40:53
From: Christoph Haller <[EM
Hi,
I would like to insert into a table values from a table and user defined
ones. Here is the example:
I found this statement to insert values from another table:
INSERT INTO test_table (cust_id, cust_name) SELECT id, name from CUSTOMER;
But the test_table has another column, which should hav