Tables: How to automatically generate SQL "create table" statement

  • ChangeSF
    Asked on May 17, 2024 at 10:05 PM

    How to automatically generate SQL "create table" statement from jotform table?

  • Sonnyfer JotForm Support
    Replied on May 18, 2024 at 1:16 AM

    Hi John,

    Thanks for reaching out to JotForm Support. Unfortunately, it's not possible in Jotform Tables to automatically generate SQL Create Table Statement. Can you tell us more about what you're trying to do? Perhaps we can raise the idea to our developers as Feature Request, if we fully understand your requirement.

    Once we hear back from you, we'll be able to help you with this.

  • ChangeSF
    Replied on May 18, 2024 at 2:25 AM

    i need to import my jotform data into an external SQL table. It's a lot of fields, so it's a lot of time and effort to manually create the external table.

    The method i found was to export the jot data to a CSV file, and then use the Import feature of SSMS. That feature automatically creates the destination table. It even guesses all the fieldtypes, based on the data.

    https://learn.microsoft.com/en-us/sql/relational-databases/import-export/import-flat-file-wizard?view=sql-server-ver16

    Please retain this thread, so other users can benefit from this solution.

    Thx

  • ChangeSF
    Replied on May 18, 2024 at 2:26 AM

    Once the destination table is created, then i can append new jotform data into the same table, and all the fields will line up correctly.

  • Sonnyfer JotForm Support
    Replied on May 18, 2024 at 2:31 AM

    Hi John,

    Thanks for the additional information. If you're using PHP, then it's possible to send your submission data to your MySQL Database. We have a guide to do that here. I'm also keeping this thread public, so other users can see the method that you shared.

    Let us know if there's anything else we can help you with.

  • ChangeSF
    Replied on May 18, 2024 at 2:34 AM

    Thx, but this thread isn't about sending data to the db. It's about creating an external table.

    Also, this thread isn't about MySQL, it's about Microsoft SQL Server.

    cheers!

  • Sonnyfer JotForm Support
    Replied on May 18, 2024 at 2:40 AM

    Hi John,

    Sorry for the confusion. As promised, I've gone ahead and escalated your original request to automatically generate SQL "create table" statement in Tables to our developers, but when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    Thanks for your patience and understanding, we appreciate it.

 
Your Answer