Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    2

    Unanswered: Generate DDL commands from existing tables

    Hi everybody. This is my first thread on this forum

    I have some tables stored in a Microsoft access mdb. Is there a way to generate/create or exist a tool that automatically reading this tables is able to create the scripts(containing the ddl commands to create this tables) for SQL Server, Oracle ?

    edit: loquin - moved this thread to the Access forum
    Last edited by loquin; 11-14-07 at 11:59.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Welcome to dbforums ....

    Oh Heck...I'm sure there is lots of stuff out there already created as addons, utilities, and even code that does this for you.

    You could write something yourself but then again...why do what's already done....over...and ...over...again.

    Check out this little demo proggy named Export Table to SQL For Access.

    Simply select the .mdb file you want to connect to,
    Select the table you want,
    Select ALL the table fields listed,
    Enter the name of the text file you want the SQL statements to be writen into,
    Select the Export CREATE TABLE statement for original table Check Box,
    Then finaly...select the run button.

    voila...a text file is created in the folder where the .mdb file is located and within that text file is the required SQL CREATE TABLE statement to create the .mdb table you selected earlier and, all the INSERT INTO statements required to place the existing data located within that .mdb table into your newly created table.

    Give it a peek. It may be what you're looking for.

    Kinda nifty...(in my opinion)

    Note: The demo does have Limitations...It will only generate 10 INSERT INTO Statements into the text file. Hmmmm...I can only handle looking at one at any time.
    .
    Last edited by CyberLynx; 11-15-07 at 01:50.
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Nov 2007
    Posts
    2
    thank you. thats what i was looking for...
    the problem is that the program is not working. I have installed the demo version but it want read the mdb file. i dont know why..

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    I have tried that little proggy on several .mdb files and it works fine. You must be doing something wrong. If the .mdb's are on a network drive then perhaps try moving them to a local drive to try it out.

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •