| From: | Richard Chrenko <rchrenko(at)bluewin(dot)ch> |
|---|---|
| To: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | how to get "autonumber" when using INSERT INTO |
| Date: | 1999-05-04 08:27:52 |
| Message-ID: | 372EAF88.49FB@bluewin.ch |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I'm trying what seems to me a trivial SQL task using Microsoft ADO to
write an Access table. I have several default tables containing the same
20 fields (but different data). I want to append the contents of these
tables into a "master" table which contains the same 20 fields in
addition to an autonumber field such that each appended record has a
unique identifier.
The following SQL queries succeed when run directly from Access
INSERT INTO mastertbl SELECT * FROM default1;
INSERT INTO mastertbl SELECT * FROM default2;
where mastertbl contains the same fields as default1 and default2 in
addition to an autonumber field. However, when these queries are
submitted via ADO from another application I get an error message that
the number of fields are unequal.
Please help me to get this to work using ADO!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dirk Lutzebaeck | 1999-05-04 09:33:34 | INSERT/UPDATE waiting |
| Previous Message | Michael J Davis | 1999-05-04 05:52:43 | RE: [SQL] Granting select on ALL tables at once |