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
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
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
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
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
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
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 ^
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