Re: Create Table in Linked Database
- From: "david epsom dot com dot au" <david@epsomdotcomdotau>
- Date: Tue, 1 Aug 2006 11:07:36 +1000
The OP *twice* mentioned 'create table statement' so I figured
It occurred to me the that the OP may have known
neither want they wanted nor what they were asking
for. I attached to your response because
1) It was an extension of your response, not Grahams,
and
2) My posting is not a complete answer, only an extension
or your answer.
and
3) Anybody who has to ask how to execute a command
against a database probably is not ready for DDL.
I agree that a Make Table query is not a complete
answer to creating a table in a database. On the
other hand, it is a compact method of doing something
that would require a lot of DDL for a large table,
and conveniently includes data transfer as well.
If you want to transfer data from your template into
your target table, a convenient way to source the data
is to put a template table into your source database.
(Yes, you can use massive SQL insert commands, but
that is not a sensible approach if you have an application
database). If you have a source table for your data,
it may be convenient to also use the source table as
a template for your target table, avoiding a lot of
error prone and unfamiliar DDL.
It may well be that "making a new release of the application"
imposes certain requirements, but I wouldn't like to
make any assumptions about what those would be, so I
think that it's a good thing that three different solutions
have been provided.
(david)
"Jamie Collins" <jamiecollins@xxxxxxxxxx> wrote in message
news:1154348411.091328.6810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
david epsom dot com dot au wrote:
Using a make table query from a table in CurrentDB
into a new table in MyData.mdb,
(air code)
SELECT myTemplateTable.* INTO
[MS Access;DATABASE=C:\MyData.mdb;].MyNewTable
FROM myTemplateTable;
or I would have said
SELECT myTemplateTable.* INTO
[C:\MyData.mdb].MyNewTable
FROM myTemplateTable;
The OP *twice* mentioned 'create table statement' so I figured they may
have wanted a SQL CREATE TABLE.
Jet's SELECT..INTO..FROM syntax does not cause the source table's
constraints etc to be retained in the new table, which I though would
be required when the OP is "making a new release of the application".
Jamie.
--
.
- Follow-Ups:
- Re: Create Table in Linked Database
- From: Jamie Collins
- Re: Create Table in Linked Database
- References:
- Re: Create Table in Linked Database
- From: Graham Mandeno
- Re: Create Table in Linked Database
- From: Jamie Collins
- Re: Create Table in Linked Database
- From: david epsom dot com dot au
- Re: Create Table in Linked Database
- From: Jamie Collins
- Re: Create Table in Linked Database
- Prev by Date: Re: Is this a Sound Database Design? -- procedurenames must be unique in same module
- Next by Date: Re: Data Access Pages
- Previous by thread: Re: Create Table in Linked Database
- Next by thread: Re: Create Table in Linked Database
- Index(es):
Relevant Pages
|