Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Richard Huxton
Clodoaldo wrote: 2008/2/29, Brent Friedman <[EMAIL PROTECTED]>: If you don't like the standard sql implementation, you could use plsql or any language to make an abstraction layer/wrapper for this functionality. Just pass everything as a key/value pair, in an array or hashtable structure, to

Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Kaloyan Iliev
Hi, I've solved this problem for me (Perl). I have a module DBAPI and write a function InsertIntoTable($table_name, $hash_with_values, $data_base_handler). I send the parms to the function in the hash (key1 => value1, key2 => value2 ...) and in the function I compose the insert and execute it.

Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Clodoaldo
2008/2/29, Brent Friedman <[EMAIL PROTECTED]>: > If you don't like the standard sql implementation, you could use plsql > or any language to make an abstraction layer/wrapper for this > functionality. Just pass everything as a key/value pair, in an array or > hashtable structure, to your abstra

Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Brent Friedman
If you don't like the standard sql implementation, you could use plsql or any language to make an abstraction layer/wrapper for this functionality. Just pass everything as a key/value pair, in an array or hashtable structure, to your abstraction layer/wrapper, and it can cycle through the data

Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Clodoaldo
2008/2/29, Martijn van Oosterhout <[EMAIL PROTECTED]>: > On Fri, Feb 29, 2008 at 01:17:20PM -0300, Clodoaldo wrote: > > When inserting into a table and there are many columns to be inserted > > it is hard to synchronize columns to values: > > > > > > > Is there some reason for the insert syntax

Re: [GENERAL] Insert vs Update syntax

2008-02-29 Thread Martijn van Oosterhout
On Fri, Feb 29, 2008 at 01:17:20PM -0300, Clodoaldo wrote: > When inserting into a table and there are many columns to be inserted > it is hard to synchronize columns to values: > Is there some reason for the insert syntax to be the way it is in > instead of the much easier to get it right Updat

[GENERAL] Insert vs Update syntax

2008-02-29 Thread Clodoaldo
When inserting into a table and there are many columns to be inserted it is hard to synchronize columns to values: insert into my_table ( a, b, c, ...many more columns )values( @a, @b, @c, ... the corresponding values ) Is there some