3 Replies Latest reply on Mar 20, 2014 6:18 AM by beverly

    Script for SQL CREATE


      Hi...was wondering if anyone had a script for creating a SQL Create statement from an FM table. I'm uploading some data into a mySQL database, and would love to be able to simply export the data and then run an import, but I need to create the table in mySQL before adding the data.




      -- L

        • 1. Re: Script for SQL CREATE

          Run a BaseElements analysis, part of what is describes is a SQL CREATE TABLE statement for each table in your solution

          1 of 1 people found this helpful
          • 2. Re: Script for SQL CREATE

            As to the script: you need to have a DSN set up for your MySQL database and then use the "Execute SQL" script step to run the SQL statement that creates the table.


            Note: not the ExecuteSQL() function call but the script step

            • 3. Re: Script for SQL CREATE

              great answers from Wim (as always). My caveat: be sure to get the correct "dump" format for creating in your particular flavor of MySQL (yes, there can be differences). My advice is to use whatever you use (one of the MySQL admin apps or phpmyadmin or the like) and create a sample dump from an existing db on your MySQL, include the CREATE. This will give you loads of information you may need. Just open in a Text editor.




              1 of 1 people found this helpful