1 Reply Latest reply on Mar 1, 2011 2:38 PM by philmodjunk

    Writing SQL TO iNSERT INTO A TABLE

    AnnCefola

      Title

      Writing SQL TO iNSERT INTO A TABLE

      Post

      I am new to Filemaker and do not have an external database. I have set up 2 sales quote tables ( main and detail table )

      That works OK but the next step is to create an action button to write an sql insert to move that data into the actual

      sales order table. How would I write that code if I dont have an external database?

       

        • 1. Re: Writing SQL TO iNSERT INTO A TABLE
          philmodjunk

          Unless you are linked to another database via ODBC you do not use SQL in FileMaker to insert data into a table. There are, however, script steps you can assemble into a script that can do that.

          However, it isn't strictly necessary to keep quotes and sales orders in separate tables. Since the data is the same in structure in most cases, you can actually keep both in the same pair of tables (main and detail), but add one more field to identify the main record as either "quote" or "sales order". In that case scripts that use Duplicate Record can duplicate the Main and detail records to create a sales order record with the same data.

          Note, you don't even have to have two records for this, the same records could, in theory, function as both the quote and sales records--but most businesses want separate recors for this as the information in the quote is often modified at the time the sale is actually placed.