Re: [firebird-support] what the most efficient way to do update or insert with value ?

2012-02-15 Thread Elmar Haneke
i want to do something like update or insert into mytable(ID, amount) values (123, amount + 100); how to do this ? Have a look at http://www.firebirdsql.org/refdocs/langrefupd21-update-or-insert.html

Re: [firebird-support] what the most efficient way to do update or insert with value ?

2012-02-15 Thread Milan Babuskov
nathanelrick wrote: i want to do something like update or insert into mytable(ID, amount) values (123, amount + 100); how to do this ? Use MERGE: http://www.firebirdsql.org/refdocs/langrefupd25-merge.html If you have an older Firebird version and still want a single SQL command, you can

[firebird-support] Parameterised procedure with a dynamic array.

2012-02-15 Thread sergiogarciaruso
Hi. I would like to parameterize a procedure with a dynamic array. Is there such functionality in Firebird? And if so, how is the syntax? I have FB v2.5 SS installed. I want to do something like this: SET TERM ^ ; CREATE OR ALTER PROCEDURE MyProc( p_inputparamINTEGER, p_dyn_array

[firebird-support] Which value will be used after converting a field from Double Prec to Decimal

2012-02-15 Thread cornievs
I have column with field type DOUBLE PRECISION and needs to convert it to DECIMAL (15,4). In a test with a field value of 23.99, I change it to DECIMAL (15,4) and got want I need in my Delphi (DBX) application of 24.. Then I change it back to DOUBLE PRECISION and notice that the value

[firebird-support] Re: what the most efficient way to do update or insert with value ?

2012-02-15 Thread nathanelrick
thanks yes the merge to the job :) but i m just curious to know if the merge is more speed efficient than a simple for select ... do begin If Exists(...) Update ... Else Insert : END because merge is not very user readable :( --- In firebird-support@yahoogroups.com, Milan Babuskov

[firebird-support] Re: Parameterised procedure with a dynamic array.

2012-02-15 Thread nathanelrick
use a string with a separator of your choice for the array ? ex: tab1#tab2#tab3# while position('#' in myarray) 0 do Currenttab = substring(...); end --- In firebird-support@yahoogroups.com, sergiogarciaruso sergiogarciaruso@... wrote: Hi. I would like to parameterize a

Re: [firebird-support] Parameterised procedure with a dynamic array.

2012-02-15 Thread Alan McDonald
On Thursday, February 16, 2012, sergiogarciaruso sergiogarciar...@gmail.com wrote: Hi. I would like to parameterize a procedure with a dynamic array. Is there such functionality in Firebird? And if so, how is the syntax? I have FB v2.5 SS installed. I want to do something like this: SET TERM ^

[firebird-support] lock the table partially

2012-02-15 Thread nathanelrick
Hello, i m in multi user database. I want to clean a table of all entries from one user (rec with field id_user=xxx) and insert new entries, BUT i must be sure that noone is not actually doing any insert on this table for this user. i can not lock the table because this will affect all the