[firebird-support] Re: Cross database update

2014-11-17 Thread masb...@za-management.com [firebird-support]
Dear Thomas, thank you for your answer. I have experienced that pssing by the trigger is functioning well. The only thing wrong is that the loop has no effect on the data of the records. And I hoped that someone could check the statement syntaxwise. Maybe I am doing something wrong in my

[firebird-support] Re: Cross database update

2014-11-17 Thread masb...@za-management.com [firebird-support]
Hi Set, thank you very much for the input. I will rework the block part and reply afterwards. Kind regards Christian

[firebird-support] Re: Cross database update

2014-11-18 Thread masb...@za-management.com [firebird-support]
HI! I have had feedback from IBExpert in respect of my block statement. The correct syntax is easy and looks like the following below. I can see in my trigger log that the update uses just one transaction but unfortunately the triggers fire although the preceding rdb$set for each record (as

[firebird-support] Re: Cross database update

2014-11-18 Thread masb...@za-management.com [firebird-support]
Hi Sean I think not. When you look at it, the two tables could also be located in one db ad then the for select update loop should point to the same topic/question. How can I do this without using a block in the update part which sets the transaction property correctly but runs isolated apart

[firebird-support] Re: Cross database update

2014-11-18 Thread masb...@za-management.com [firebird-support]
And another thing. Deactivating the triggers is not an option for me but it works. execute statement 'alter trigger files_au0 inactive'; execute statement 'alter trigger files_bu0 inactive'; execute statement 'alter trigger pool_loss_record_bu0 inactive'; update

[firebird-support] Re: Cross database update

2014-11-19 Thread masb...@za-management.com [firebird-support]
Hi All! Just to close this and perhaps some one is interested. I have now had several excellent feedbacks from the IBExpert Support forum which solved the problem. The relevant part has to be like this: select rdb$set_context('USER_TRANSACTION', 'bulkload', '1') from rdb$database into

[firebird-support] Common Table Expressions (“WITH ... AS ... SELECT”)

2015-01-22 Thread masb...@za-management.com [firebird-support]
Hi to all, I am in the process of writing a list of entries with running costs in a quarter and all costs that have arsien since. So, I wrote a stored procedure with the mathematical logic for calculating the respective sums with different rates of exchange and some other rules. I made this

[firebird-support] Re: Common Table Expressions ( “WITH ... AS ... SELECT”)

2015-01-26 Thread masb...@za-management.com [firebird-support]
Hi Dimitry, thank you for your response. I think in my case I can replace the outer join with an inner join, because it is the same sp with the same query parameters I am calling twice. Are there any future plans to change this re-evaluation structure in outter joins? Kind regards Christian

[firebird-support] Get/set context in derived table context

2015-03-19 Thread masb...@za-management.com [firebird-support]
Hi all, I have the need to implement something like a row number and read the last thread about the autoincrement number which also led me to this FAQ: http://www.firebirdfaq.org/faq343/ http://www.firebirdfaq.org/faq343/ I now tried something like this: select

[firebird-support] Re: Get/set context in derived table context

2015-03-19 Thread masb...@za-management.com [firebird-support]
What I initially wanted to do with this approach is join two datasets from different and different context variables sources with the row numbers as join criteria, which does not work at all, even when the individual queries show matching row numbers. BTW I start all processes with a

Re: [firebird-support] Get/set context in derived table context

2015-03-20 Thread masb...@za-management.com [firebird-support]
Hi Louis and Walter, thank you very much for your responses. My Spanish is not so good but rudimental thanks to my Latin from school. So I will try the other approaches. Basically I need a join criteria to connect two datasets that have otherwise nothing in common than the order that I am

[firebird-support] Re: Get/set context in derived table context

2015-03-20 Thread masb...@za-management.com [firebird-support]
So, I now used two small SPs with row_count and joined the output. Works fine for me. Thanka and kind regards Christian