Re: Create Table in Linked Database



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.

--



.



Relevant Pages

  • Re: Autonew macro in Word to select specific record from Excel databas
    ... See answer to your identical post in the mailmerge.fields newsgroup. ... A response in one newsgroup will then appear in all of the newsgroups ... that record will be merged into the document based on that template. ... within the template that are populated from the database. ...
    (microsoft.public.word.vba.general)
  • Re: Mail merge data base problems
    ... I opened the .dot file, located the database. ... >> I can technically do anything to the template as long ... >See if that opens without problems. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Installer and Security
    ... you have to import the template into a security database before you ... I think SECEDIT will also import the template to a database too, ... unless you find and run the ADMINPAK.MSI file to install the extra MMCs]. ...
    (microsoft.public.win2000.security)
  • RE: Removing Blank Lines
    ... I have a setup for data clean up that you might find interesting. ... template database with a template table named tblCleanUp. ... and then import a template make-table query from ...
    (microsoft.public.access.formscoding)
  • Re: Cluster will not fail over.
    ... Below is the response from Microsoft as promised. ... They think a cluster does all the ... Database operations isn't magic, we need to quit treating it ...
    (microsoft.public.sqlserver.clustering)