[thelist] Tip - ColdFusion and Datasources

Paul Cowan evolt at funkwit.com
Sun Aug 17 06:45:39 CDT 2003

rudy wrote:
> but listen up -- they do some things really well, e.g. they support some
> stuff that other databases don't
> for example, if you have a form with multiple entries on it, like an order
> form with ten order items, and you want to insert the multiple entries
> into a table, you can do this --

<carygrant>Rudy, Rudy, Rudy...</carygrant>

You can do a multiple-insert in a single statement in most SQL databases...
you just have to think laterally.

<tip type="SQL" author="Paul Cowan">
Need to do multiple inserts in a single SQL statement? Try this.
Should work in most any SQL-89 compliant database, if I'm not

   insert into orderitem
   union all select
   union all select
   ... etc ..

Easy peasy!

More information about the thelist mailing list