Currency Bug

Changing the import format associated with any location appears to set Functional Currency to [NONE] (no matter what it was previously) and Data Value to <Entity Currency>. Bug?

02-Jul-2008 12:39 PM
jarekjaz wrote:
Hi :-)
It is not possible to set rate to local currency.
Instead of multiply local currency by CHF rate the E51 currency converter should divide. My own solution is that I have to set the rate as (1/rate_value), but I think that Nokia made a bug in converter software.
In this case the calculator and currency converter should has copy/paste functionality.
Hi - You definitely shouldn't have to specify the rate as 1/rate_value.
I'm not sure if we're using the same Converter program, but I will talk you through how mine is configured (remembering I am in the UK)
1) Load Converter
2) Goto Options > Conversion Types
3) Choose Currency and then press OK
4) Goto Options > Currency Rates
5) Configure as follows :
Home : 1
EUR : 0.298866
CHF : 0.480853
So the rates specified for EUR and CHF is how many EUR and CHF you get for 1 unit of your currency
For me I have the following set :
Home : 1
USD : 1.97
EUR : 1.235
Then Press Done
6) You should now have the main screen that says from the top :
Type : Currency
Unit : Home
Amount : x
Unit : USD (For you this will be EUR or CHF - you can choose)
Amount : y
So now if you enter any number in x OR y it'll convert it into the other currency for you without having to specify a 1/rate_value format.
Hope this helps
Regards,
Edward

Similar Messages

  • Currency change bug CHF - USD

    Hi!
    I wanted to do a song form a link. It redirect me on the itunes store webpage, there was 0.99$. Normally prices are close. Applications on the store at 0.99$ are at 1 chf.
    I was excepting to have 1 or 1.2 chf for the song, but it is at 1.6chf. Meaning the change would be 1$ = 1 chf. But in reality, 1$ = 0.88chf. There is a HUGE problem there. I think it is a bug. Does anyone knows what is going on?
    Thanks.

    Hi,
    You can get reporting in Company Code currency, If your co code currency is Euro and you are maintaining exchagne rated in T. Code OB08 for M type for USD you can simulate the balanced in Euro by clicking display currency in Accounting Doc display.
    Regards,
    JA

  • Row Currency a bug in 10.3.4 Stegman, please help

    I have a ReadOnlyView bound to two pages. When I move from one page to the next one, why do I get RowCurrency errors? is the only way to solve this is by setting EnableTokenValidation=false in pagedef? Sounds like this is stopgap solution. I also noticed that this is a 3.4 bug. I use 10.3.4

    John:
    Here is the story
    I have a Read Only View Object that returns me certain data from a table. Now, I do need to check the data on each page. In other words, I do have to get the data in the AppModule before loading each page. Let us say, the App Module controls several pages. I go to the first page, the method in the AppmModule that retrieves data from the readonly data works perfectly. Now, I click on a second page, when I run the AppModule that calls the VO, before the page is loaded, I get RowCurrency error. It sounds like the App Module has lost all ideas of a row in the VO. That is fine, I don't care where the row is. It is just a search VO and a readonly VO. is there something I need to do to refresh the VO or the iterator? If so, how? I know the criteria I use to execute the query that operates on the VO in the app module has changed. But, that should not matter. It is a readonly VO.
    I am so confused I am thinking about creating a new VO that does the same thing with a different name for each pages. But, I know that is a bad solution.
    ADFBCUSER

  • Bug in Converting Currencies with SL Calculator

    I am trying to update the currencies in my Snow Leopard Calculator, but it's not working.
    When I click on "Update" button nothing happens.
    Can someone help me, please?
    Thank you or your attention.

    If you need currency conversion information use www.oanda.com. They have online converters plus tons of other information. Or you can find alternative utilities and widgets that do work at VersionTracker or MacUpdate.

  • 15 concurrent users and JBO-35007 row currency has changed

    Hi!
    Something for the weekend :)
    I have an ADF/BC 10.1.3.3. application on 10.1.3.3. Oracle AS. I use a jazn security with users and roles stored in database tables. While testing with one or two users I never ran into the same problem as we had this week when testing with 15 users. I have an entity and VO with a whole attributes that are edited in a couple of jspx pages that composed with process train control. There are also a couple of detail data edited on this page. I'm using ProcessScope quite a lot to pass some information between the pages.
    Well, to get to the point: when testing with 15 users we had A LOT of JBO-35007 row currency has changed since the user interface was rendered errors in this process. Every user was editing it's own data row. The error appeared every time a user left the application inactive for a couple of seconds, entered some data and clicked commit. I'm not aware of the security settings of the browser on the testing computers and I can't get them now to see if something like this could be the problem.
    When I checked the log files, there are a lot of errors or warnings in them. I'll try to sum the ones that might be important for this issue. These errors appear a lot's of times in these log files that is why I'm assuming some of these are connected to my issue.
    application.log file in application-deployments logs:
    08/04/23 09:58:42.443 MyViewControllerArchive: Servlet error
    java.io.IOException: An existing connection was forcibly closed by the remote host
    08/04/23 11:31:47.980 MyViewControllerArchive: Servlet error
    java.io.IOException: An established connection was aborted by the software in your host machine
    08/04/23 11:31:49.402 MyViewControllerArchive: Servlet error
    java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 0 is out of bounds. It should be between 0 and -1
    08/04/23 11:33:19.104 MyViewControllerArchive: An established connection was aborted by the software in your host machine
    08/04/23 11:33:19.104 MyViewControllerArchive: Servlet error
    java.io.IOException: An established connection was aborted by the software in your host machine
    A whole lot of these kind of errors:
    08/04/23 11:24:06.80 MyViewControllerArchive: Servlet error
    oracle.jbo.common.ampool.ApplicationPoolException: JBO-30019: An unavailable cookie state was detected while attempting to use a cookie. applicationId: 54ffe51d30d5c84e0cb1979645a196749529aeb674d8, sessionId: MyModuleDataControl.
    08/04/24 08:39:22.424 MyViewControllerArchive: Servlet error
    java.lang.IllegalStateException: Response has already been committed
    log.xml file in oc4j folder:
    <MESSAGE>
              <HEADER>
                   <TSTZ_ORIGINATING>2008-04-23T09:53:49.165+02:00</TSTZ_ORIGINATING>
                   <COMPONENT_ID>adfinternal</COMPONENT_ID>
                   <MSG_TYPE TYPE="WARNING"/>
                   <MSG_LEVEL>1</MSG_LEVEL>
                   <HOST_ID>my_AS</HOST_ID>
                   <HOST_NWADDR>my_IP</HOST_NWADDR>
                   <MODULE_ID>view.faces.model.binding.FacesCtrlRangeBinding</MODULE_ID>
                   <THREAD_ID>10</THREAD_ID>
                   <USER_ID>SYSTEM</USER_ID>
              </HEADER>
              <CORRELATION_DATA>
                   <EXEC_CONTEXT_ID>
                        <UNIQUE_ID>1208937229:my_IP:3020:1764:630</UNIQUE_ID>
                        <SEQ>1</SEQ>
                   </EXEC_CONTEXT_ID>
              </CORRELATION_DATA>
              <PAYLOAD>
                   <MSG_TEXT>rowIterator is null</MSG_TEXT>
              </PAYLOAD>
         </MESSAGE>
    <MESSAGE>
              <HEADER>
                   <TSTZ_ORIGINATING>2008-04-23T09:48:30.903+02:00</TSTZ_ORIGINATING>
                   <COMPONENT_ID>j2ee</COMPONENT_ID>
                   <MSG_ID>J2EE DS-00265</MSG_ID>
                   <MSG_TYPE TYPE="WARNING"/>
                   <MSG_LEVEL>1</MSG_LEVEL>
                   <HOST_ID>my_AS</HOST_ID>
                   <HOST_NWADDR>my_IP</HOST_NWADDR>
                   <MODULE_ID>datasource</MODULE_ID>
                   <THREAD_ID>12</THREAD_ID>
                   <USER_ID>SYSTEM</USER_ID>
              </HEADER>
              <CORRELATION_DATA>
                   <EXEC_CONTEXT_ID>
                        <UNIQUE_ID>my_IP:57162:1208526415373:226</UNIQUE_ID>
                        <SEQ>0</SEQ>
                   </EXEC_CONTEXT_ID>
              </CORRELATION_DATA>
              <PAYLOAD>
                   <MSG_TEXT>Unclosed connection detected : 'oracle.oc4j.sql.spi.ConnectionFinalizer@f67148' : ''.</MSG_TEXT>
              </PAYLOAD>
         </MESSAGE>
    <MESSAGE>
              <HEADER>
                   <TSTZ_ORIGINATING>2008-04-23T09:53:54.165+02:00</TSTZ_ORIGINATING>
                   <COMPONENT_ID>adf</COMPONENT_ID>
                   <MSG_TYPE TYPE="WARNING"/>
                   <MSG_LEVEL>1</MSG_LEVEL>
                   <HOST_ID>my_AS</HOST_ID>
                   <HOST_NWADDR>my_IP</HOST_NWADDR>
                   <MODULE_ID>controller.faces.lifecycle.FacesPageLifecycle</MODULE_ID>
                   <THREAD_ID>13</THREAD_ID>
                   <USER_ID>SYSTEM</USER_ID>
              </HEADER>
              <CORRELATION_DATA>
                   <EXEC_CONTEXT_ID>
                        <UNIQUE_ID>1208937232:my_IP:3020:508:635</UNIQUE_ID>
                        <SEQ>299</SEQ>
                   </EXEC_CONTEXT_ID>
              </CORRELATION_DATA>
              <PAYLOAD>
                   <MSG_TEXT>JBO-35007: My 35007 JBO message since I overwritten the message text</MSG_TEXT>
              </PAYLOAD>
         </MESSAGE>
    The problem is I can't reproduce this behaviour any more in my environment. If someone could maybe point me to the errors that are important and could be the cause of this errors. Could this be an internet browser security settings issue? What about those errors about aborted connections?
    If you can't provide me an answer (which I know it would be very difficult by the information provided), maybe you could explain the cause of some of the errors described above?
    I'd appreciate any tips on this since I don't have e an idea how and where to start to at least reproduce and find out the cause of this. Than I'll worry about the solution :).
    Thank you in advance,
    BB

    Hi,
    I am also facing the same issue JBO-30019: An unavailable cookie state is detected while attempting to use a cookie from application {0}, session {1}.
    Is there anyone who has been able to reproduce this. If yes can you please update the following bug which is logged for the issue: [9507310|https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?report_title=&rptno=9507310&query_id=814000&rptno_count=1&pos=1]
    It will be of much help.
    I have found the following page referring the problem: page, if this helps.
    Please update.
    Regards,
    Ashis
    글 수정: user9546421

  • Currency Translation key not appearing in dropdown for selection

    Hi BI Gurus,
    We are using BI 7.0 SP 08 and SAPGUI 6.40 patch level 19. Let me explain our scenario.
    We are using SEM-BPS for Planning. Data is loaded to BW InfoCubes and then uploaded to summerized Infocube.
    We are also loading data from flatfiles into other set of custom Infocubes similar to IM Cubes.
    Planning is done in Transactional infocube and there is multiprovider on top of Transactional Cube, Summerized standard Cube and summerized custom infocube (for flatfile) for reporting.
    We are pushig back the final plans to R/3 system and currency conversion is automatic. There is no problem here.
    We are loading planing data and actuals from flat files to our IM custom Infocubes. The data is coming in different currencies and we are converting and updating in the cubes in fixed currency USD. Once plans are finalized,we want to give some kind of tool to the users to see their appropriation requests and the plan value in local currency. We are thinking to create some BEX queries for this purpose. Users will Select their requests and currency and the query will display their requests in local currency.
    RRC1 tcode does not work in BI 7.0. There is an equivalent Tcode RSCUR to create the Currency Translation Key. I created a translation key. Now I am trying to use this key into BEX, using GUI for 3.X and BI 7.0. This key is not appearing in the dropdown for the currency translation key selection. So there is no way I can use this key. 
    I went through a number of postings in this forum and still looking for the right one. Is something I am missing? or Is some bug in BI 7.0.
    I know it was working in BW 3.5. Can you guys share your experience? Any help is appreciated.
    Thanks.
    Sheo

    OSS note 968356 might be applicable.
    <i>
    Symptom
    No currency translation is available in BEx Web. You cannot call a currency translation dialog box using the context menu.
    Reason and Prerequisites
    Business Explorer, NW2004s, SPS8, SPS9
    You use BEx Web applications in SAP NetWeaver 2004s.
    </i>

  • Table in pages template doesn't keep currency...

    I'm trying to setup an invoice template for £, $ and € in Pages, but no matter what currency I format the cells with, when I open the template again, they are all in £ (I'm in Britain)
    Is this a bug? Can I override this somehow?
    Thanks so much for any help!
    Christoph

    sixbysixx wrote:
    I'm trying to setup an invoice template for £, $ and € in Pages, but no matter what currency I format the cells with, when I open the template again, they are all in £ (I'm in Britain)
    Is this a bug? Can I override this somehow?
    Amazing, this resemble seriously to a bug.
    Same behaviour in Numbers.
    The styles embedded in the template contain the correct information upon currencies. It seems odd that it is dropped.
    I sent a bug report ID# 6322095.
    +Message from the Apple Discussions forum.+
    +I'm trying to setup an invoice template for £, $ and € in Pages, but no matter what currency I format the cells with, when I open the template again, they are all in £ (I'm in Britain)+
    +Is this a bug? Can I override this somehow?+
    +I checked and it's perfectly true. This oddity strikes also in Numbers (an maybe in Keynote).+
    +When I look in the Index-xml stored in the templates, the styles dedicated to the cells contains the correct info.+
    +<sf:cell-style sfa:ID="SFTCellStyle-44" sf:cell-style-default-line-height="12" sf:parent-ident="tabular-Basic-body-cell-style-id">+
    <sf:property-map>
    <sf:SFTCellStylePropertyNumberFormat>
    +<sf:number-format sfa:ID="SFTNumberFormat-22" sf:format-type="1" sf:format-string="#,##0.00 &#xA4;;-#,##0.00 &#xA4;" sf:format-decimal-places="2" sf:format-currency-code="USD" sf:format-negative-style="0" sf:format-show-thousands-separator="true" sf:format-fraction-accuracy="-3" sf:format-use-accounting-style="false"/>+
    +<sf:cell-style sfa:ID="SFTCellStyle-46" sf:cell-style-default-line-height="12" sf:parent-ident="tabular-Basic-body-cell-style-id">+
    <sf:property-map>
    <sf:SFTCellStylePropertyNumberFormat>
    +<sf:number-format sfa:ID="SFTNumberFormat-23" sf:format-type="1" sf:format-string="#,##0.00 &#xA4;;-#,##0.00 &#xA4;" sf:format-decimal-places="2" sf:format-currency-code="EUR" sf:format-negative-style="0" sf:format-show-thousands-separator="true" sf:format-fraction-accuracy="-3" sf:format-use-accounting-style="false"/>+
    +<sf:cell-style sfa:ID="SFTCellStyle-48" sf:cell-style-default-line-height="12" sf:parent-ident="tabular-Basic-body-cell-style-id">+
    <sf:property-map>
    <sf:SFTCellStylePropertyNumberFormat>
    +<sf:number-format sfa:ID="SFTNumberFormat-24" sf:format-type="1" sf:format-string="#,##0.00 &#xA4;;-#,##0.00 &#xA4;" sf:format-decimal-places="2" sf:format-currency-code="GBP" sf:format-negative-style="0" sf:format-show-thousands-separator="true" sf:format-fraction-accuracy="-3" sf:format-use-accounting-style="false"/>+
    +but the cells are all created according to the system's currency.+
    +It's not only foolish, it's really annoying.+
    Yvan KOENIG (from FRANCE lundi 27 octobre 2008 17:33:51)

  • MC$4 report shows PO value in wrong currency

    MC$4 report shows PO value in wrong currency EUR (EURO) eventhough PO
    was created with SEK (swiss) currency. Report picks data from info
    table S012 that also reflects wrong currency.
    Please check attached example....
    Currency is getting picked up in table S012 info-structure from company
    code table T001 (PO belongs to) not from purchase order.
    This is certainly bug in standard SAP LIS report. This is inbuilt LIS feature given by SAP & we cannot do any fixing.
    Can you provide solution how we can correct this error. How to display correct currency in report & info-structure S012.

    hi
    in the report the system might be taking the co code currency
    what u have to do is go to  MC$4  press ctrl+F7
    u will get the currency change option change it to what u want
    regrads
    kunal
    awrad if helpful

  • Bug in sqlserver 2014 long processing time in query optimizer for complex query. With compatibility set to 2012, everything is quick.

    Believe the bug to be related to the new cardinality estimator. In my case joining 7 tables it took 4 seconds to see the query execution plan, with 8 tables it took 1 minute and with 9 tables 15
    minutes! the actual processing of the query plan was sub second. (each table has only two records...)
    It looks as if there is a workload in the cardinality estimator that escalates as the number of tables and join columns increases.
    We have a number of these queries in our application and the bug is a showstopper for our customers. They will have to set compatibility level to 110 (sqlserver 2012) to run the app. Then they should
    probably not upgrade from 2012...
    Is this a known bug? What is the bug number? How can I follow the bug to see when it is fixed?
      Here is my testcase: (first building tables and data, and then the query with some comments. A version spending 15 minutes in the optimizer, takes 0 seconds to complete with the hint "option (QUERYTRACEON 9481) ".  we can't use this
    hint in the application because no dba will allow an application like ours to run as sysadmin...
    SCRIPT:
    -- Example has one table containing 25 rows. another containing 2 rows. 
    -- The one with two rows is joined in several times. 
    -- In the original query each of these joins were to separate tables. 
    -- I use this simplification because it makes it easier to build the testcase.
    ------------  CREATE TEST CASE   ----------
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[oleclient](
    [acc_f_agio] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_f_dag] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_notes_ap] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_notes_ar] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_per_cost] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_per_inc] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_reverse] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_undec_ap] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_undec_ar] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_vat_pay] [varchar](25) NOT NULL DEFAULT (' '),
    [attr_id_balance] [varchar](4) NOT NULL DEFAULT (' '),
    [bal_acc_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [bal_acc_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [balance_acc] [varchar](25) NOT NULL DEFAULT (' '),
    [bank_fee_acc] [varchar](25) NOT NULL DEFAULT (' '),
    [bflag] [int] NOT NULL DEFAULT ((0)),
    [client] [varchar](25) NOT NULL DEFAULT (' '),
    [client_name] [varchar](255) NOT NULL DEFAULT (' '),
    [comp_reg_no] [varchar](25) NOT NULL DEFAULT (' '),
    [compress_flag] [tinyint] NOT NULL DEFAULT ((0)),
    [country] [varchar](255) NOT NULL DEFAULT (' '),
    [country_code] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_client] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_item] [tinyint] NOT NULL DEFAULT ((0)),
    [cur_type] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_type_tri] [varchar](25) NOT NULL DEFAULT (' '),
    [curr_period] [int] NOT NULL DEFAULT ((0)),
    [currency] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_tri] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_acc_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_acc_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_account] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_chk_v2] [tinyint] NOT NULL DEFAULT ((0)),
    [diff_chk_v3] [tinyint] NOT NULL DEFAULT ((0)),
    [dim_v2_type] [varchar](25) NOT NULL DEFAULT (' '),
    [dim_v3_type] [varchar](25) NOT NULL DEFAULT (' '),
    [employer_id] [varchar](12) NOT NULL DEFAULT (' '),
    [header] [varchar](30) NOT NULL DEFAULT (' '),
    [header2] [varchar](30) NOT NULL DEFAULT (' '),
    [headquarter] [varchar](25) NOT NULL DEFAULT (' '),
    [language] [varchar](2) NOT NULL DEFAULT (' '),
    [last_update] [datetime] NOT NULL DEFAULT (CONVERT([datetime],'19000101 00:00:00:000',(9))),
    [leg_act_cli] [varchar](25) NOT NULL DEFAULT (' '),
    [max_inv_diff] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_inv_diff_v2] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_inv_diff_v3] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff_v2] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff_v3] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [municipal] [varchar](25) NOT NULL DEFAULT (' '),
    [overrun_pct] [decimal](28, 8) NOT NULL DEFAULT ((0.0)),
    [pay_client] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_diff_acc_g] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_diff_acc_l] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_ref] [varchar](25) NOT NULL DEFAULT (' '),
    [period_no] [smallint] NOT NULL DEFAULT ((0)),
    [remind_ref] [varchar](20) NOT NULL DEFAULT (' '),
    [rev_vat_disc_ap] [tinyint] NOT NULL DEFAULT ((0)),
    [rev_vat_disc_ar] [tinyint] NOT NULL DEFAULT ((0)),
    [sys_setup_code] [varchar](2) NOT NULL DEFAULT (' '),
    [tax_office_no] [varchar](50) NOT NULL DEFAULT (' '),
    [tax_office_ref] [varchar](20) NOT NULL DEFAULT (' '),
    [tax_system] [varchar](25) NOT NULL DEFAULT (' '),
    [user_id] [varchar](25) NOT NULL DEFAULT (' '),
    [vat_reg_no] [varchar](25) NOT NULL DEFAULT (' '),
    [agrtid] [bigint] IDENTITY(1,1) NOT NULL,
    UNIQUE NONCLUSTERED 
    [agrtid] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
      ('8081','8181',' ',' ','2442','1481','9998',' ',' ','1320',' ','9998',' ',' ','8110','0','UK','Agresso Demo UK','987654321012','0','United Kingdom','GB','UK','1','1','EU','200409','GBP','EUR','EUR','USD','9998','9998','9998','1','0','EU','$',' ','Agresso
    demo','Corporate Office','NO','EN','2004-09-27 12:39:00.000','UK',0.020,0.000,0.000,0.100,0.000,0.000,'0301',0.00000000,'UK','9998','9998','Jim Smith','12','Mike Anderson','0','0','EN','Bristol Brunel','V123/123',' ','JOSUTTON','123456789101');
    insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
       ('8060','8160',' ',' ','2960','1480','1490',' ',' ',' ',' ',' ',' ',' ','7770','0','N1','N1 - Énklient','971332421','0','Norway','NO','N1','0','1',' ','200701','NOK',' ','EUR',' ',' ',' ','9999','0','0','E',' ','971332421','Agresso Demo Norge (NO)','Agresso
    Demo Norge (NO)','NO','NO','2007-01-26 08:31:00.000','N1',0.050,0.000,0.000,0.500,0.000,0.000,'0301',5.00000000,'N1','9999','9999',' ','12',' ','0','0','NO',' ',' ',' ','SYSNO','971332421');
    insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
     ('900000','900000',' ',' ',' ',' ','900100',' ',' ',' ',' ',' ',' ',' ','470000','0','BE','DEMO Belgie',' ','0','Belgium','BE','BE','0','1',' ','200208','EUR',' ','USD','GBP',' ',' ','900100','0','0','2','3',' ',' ','Agresso Business World','BE','EN','2005-11-18
    17:07:00.000','BE',0.050,0.000,0.000,0.050,0.000,0.000,'2018',0.00000000,'BE','900100','900100',' ','12',' ','0','0','BT',' ',' ',' ','SYSBE','BE461149381');
      insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8030','8040',' ',' ','1250','2450','9998',' ',' ',' ',' ',' ',' ',' ','8060','0','A99','Seneca N.V. - Reporting / Intellagent',' ','0',' ','NL','A99','0','1',' ','201105','EUR',' ','USD',' ',' ',' ','9998','0','0','2',' ',' ','Seneca N.V. - Report / Intell','Seneca
    N.V. - Report / Intell','A01','EN','2011-05-19 12:19:59.000','A99',0.010,0.000,0.000,5.000,0.000,0.000,' ',0.00000000,'A99','9998','9998',' ','12',' ','0','0','EN',' ',' ',' ','SYSTEM',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('766000','666000','445860','445870','486000','487000',' ','445806','445807','445806',' ',' ','DEVISES',' ',' ','3','FR','Agresso Demo France',' ','0','France','FR','FR','1','1','1','200509','EUR','EUR',' ','FRF',' ','DEVISES','471000','0','1',' ','1',' ','Agresso
    demo France','Agresso demo France','FR','FR','2005-08-30 09:27:00.000','FR',0.100,0.000,0.500,10.000,0.000,0.000,'92',0.00000000,'FR',' ',' ',' ','12',' ','0','0','FR',' ',' ',' ','SYSFR','FR12345678');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ','9999',' ',' ',' ',' ',' ',' ',' ',' ','0','AU','Agresso Australia','123456789','0','Australia','AU','AU','0','1',' ','200708','AUD',' ',' ',' ',' ',' ','9999','0','0',' ',' ',' ','Agresso demo Australia','Corporate Office','AU','AU','2007-04-19
    12:40:00.000','AU',0.000,0.000,0.000,0.000,0.000,0.000,' ',0.00000000,'AU','9999','9999',' ','12',' ','0','0','AU',' ',' ',' ','SYSAU','123456789')
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8060','8160',' ',' ','2960','1480','1490',' ',' ',' ',' ',' ',' ',' ','7770','0','NO','Agresso Demo Norge (NO)','971332425','0','Norway','NO','NO','0','1',' ','201401','NOK',' ','EUR',' ',' ',' ','9999','0','0','E',' ','971332425','Agresso Demo Norge (NO)','Agresso
    Demo Norge (NO)','NO','NO','2014-01-11 12:34:54.000','NO',0.050,0.000,0.000,0.500,0.000,0.000,'0301',5.00000000,'NO','9999','9999',' ','12',' ','0','0','NO',' ',' ',' ','SYSNO','971332425');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('9999','9999',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','9999','0','SF','Agresso Demo SF',' ','0','Finland','SF','SF','0',' ',' ','0','FIM',' ',' ',' ',' ',' ','9999','0','0',' ',' ',' ','Agresso Demo','Hovedkontoret','SF','SE','1996-01-18 03:25:00.000','SF',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'SF','9999','9999',' ','12',' ','0','0','SF',' ',' ',' ','SYSTEM',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','US','Agresso Demo Corp.',' ','0',' ','US','US','1',' ',' ','199702','USD',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ','Agresso Demo Corp.','Headquarter','US','US','1997-01-21 02:45:00.000','US',0.020,0.000,0.000,5.000,0.000,0.000,'
    ',0.00000000,'US',' ',' ','John Smith','12','Elsa Beskow','0','0','EN',' ',' ',' ','SYSNO',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8081','8181',' ',' ','2442','1481','9998',' ',' ','1320',' ','9998',' ',' ','8110','0','EN','Agresso Demo','987654321012','0','United Kingdom','GB','EN','1','1','EU','201401','GBP','EUR','EUR','USD','9998','9998','9998','1','0','EU','$',' ','Agresso demo','Corporate
    Office','NO','EN','2014-01-06 10:20:58.000','EN',0.020,0.010,0.000,0.100,0.000,0.000,'0301',0.00000000,'EN','9998','9998','Jim Smith','12','Mike Anderson','0','0','EN',' ',' ',' ','SYSEN','123456789101');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','10','Test company 10 (for multiclient)',' ','0',' ','GB','EN','0','1',' ','200801','GBP',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ','Test company 10 (multiclient)','Test company 10 (multiclient)','EN','EN','2008-05-07
    10:57:51.000','EN',0.010,0.000,0.000,1.000,0.000,0.000,' ',0.00000000,'EN',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('4840','6880',' ',' ','1900','3900',' ','1410','3810','3810',' ','9998','9998',' ',' ','1','DE','D3 Demo Fibu/Projekt/Logistik','1277777001','0',' ','DE','DE','1','1','1','200204','EUR','EUR','USD','DEM','9998','9998','9998','1','1','2','1',' ','Agresso Demo
    Fibu/Pr/Log','Agresso Demo Fibu/Pr/Log','DE','DE','2002-04-03 17:28:00.000','DE',0.050,0.000,0.000,5.000,0.000,0.000,' ',0.00000000,'DE','4720','4720',' ','12',' ','0','0','DE','Finanzamt München II',' ',' ','SYSDE','DE888999777');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','PF','Performance test company',' ','0',' ','GB','PF','0','1',' ','200910','GBP',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','PF','EN','2009-10-14 15:49:10.000','PF',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'PF',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','01','RD Reporting Team - Test Client 01',' ','0',' ','NO','01','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:29:46.000','01',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'01',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','02','RD Reporting Team - Test Client 02',' ','0',' ','NO','02','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:30:11.000','02',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'02',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','03','RD Reporting Team - Test Client 03',' ','0',' ','NO','03','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:30:47.000','03',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'01',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','9998',' ',' ',' ','0','FP','FIN PROC Test Project','321456987','0',' ','NO','FP','0','1','1','201206','EUR','EUR','USD','USD','9998','9998',' ','1','1','2','2',' ','FIN PROC Test Project','FIN PROC Test Project','FP','EN','2012-09-24
    10:43:27.000','FP',0.000,0.000,0.000,0.000,0.000,0.000,' ',0.00000000,'FP',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','FRODE','321456987MVA');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','DM','Agresso Deployment Manager',' ','0',' ','NO','DM','0',' ',' ','201301',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','DM','EN','2013-11-06 13:55:17.000','DM',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'DM',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ',' ',' ',' ','6570','0','S1','Agresso Demo Client S1','556558-7893','0','Sweden','SE','S1','1','1',' ','200401','SEK',' ','NOK','EUR','8322','8321','3740','1','1','3','6','5565587893',' ','Utbildningsföretaget
    AB','SE','SE','2005-02-10 22:04:00.000','S1',0.500,0.000,0.000,0.500,0.000,0.000,' ',0.00000000,'S1','3740','3740','Anna Kronstam','12','Thomas Jelf','0','0','SE',' ',' ',' ','SYSEN','SE556558789301');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ',' ',' ',' ','6570','0','S2','Agresso Demo Client S2','556558-7893','0','Sweden','SE','S2','1','1',' ','200202','SEK',' ','NOK','EUR','8322','8321','3740','1','1','3','6','5565587893',' ','Utbildningsföretaget
    AB','SE','SE','2005-01-17 13:20:00.000','S2',0.500,0.000,0.000,0.500,0.000,0.000,' ',0.00000000,'S2','3740','3740','Anna Kronstam','12','Thomas Jelf','0','0','SE',' ',' ',' ','SYSSE','SE556558789301');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('910156','910166',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','NL','DEMO Nederland','KVK9937465','0','Holland','NL','NL','0','1',' ','200708','EUR',' ',' ',' ',' ',' ','999999','0','0',' ',' ',' ','Global Trada N.V.','Global Trada N.V.','NL','NL','2007-08-15
    13:41:00.000','NL',50000.000,0.000,0.000,50000.000,0.000,0.000,'3994 DB',0.00000000,'NL','470720','470720',' ','12',' ','0','0','NL',' ',' ',' ','ROB','NL009404296B01');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('4664','4730',' ',' ','4755',' ',' ',' ',' ',' ',' ',' ',' ',' ','4755','0','DK','Agresso Demo Denmark',' ','0','Denmark','DK','DK','0','1',' ','0','DKK',' ',' ',' ',' ',' ',' ','0','0',' ',' ','0123456789','Agresso Denmark','Agresso Denmark','DK','DK','2005-10-14
    08:40:00.000','DK',0.100,0.000,0.000,0.100,0.000,0.000,' ',0.00000000,'DK',' ',' ',' ','12',' ','0','0','DK',' ',' ',' ','SYSDK',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('76800','66800',' ',' ','48000','48500','99999','47201','47701',' ',' ',' ',' ',' ','66910','1','SP','Agresso Spain',' ','0','Spain','ES','SP','0','1','1','200804','EUR','EUR','GBP',' ',' ',' ','99999','0','0','2',' ',' ','Agresso DEMO S.A','Agresso DEMO S.A','SP','ES','2008-04-07
    14:01:38.000','SP',0.010,0.000,0.000,0.010,0.000,0.000,' ',0.50000000,'SP','99999','99999','Dpto.Aministración','12','Dpto.Riesgos','0','0','ES','00007307','18ru0456',' ','SYSES','B18389742');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ','8439',' ',' ','6570','0','SE','UTBILDNINGSFÖRETAGET AB','2021001235','0',' ','SE','SE','0','1',' ','200707','SEK',' ','EUR',' ','8439',' ','3740','1','0','2',' ',' ','Masterföretaget AB','Masterföretaget
    AB','SE','SE','2008-06-09 12:38:43.000','SE',0.500,0.000,0.000,0.500,0.000,0.000,'STLM',0.05000000,'SE','3740','3740',' ','12',' ','0','0','SE',' ','Stockholm',' ','SYSEN','SE202100123501');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8081','8181',' ',' ','2442','1481','9998','1301','1307','1320',' ','9998',' ',' ','8110','1','IT','IT - Client',' ','0','Italy','IT','IT','1','EU','EU','200601','EUR','EUR','EUR','USD','9998','9998','9998','1','0','EU','$','CODE SIA','Agresso demo Italia','Corporate
    Office','IT','IT','2006-09-28 08:46:00.000','IT',0.020,0.000,0.000,0.100,0.000,0.000,'0301',0.00000000,'IT','9998','9998','Jim Smith','12','Mike Anderson','0','0','IT','Tax authority province','Auto-no011299',' ','SYSEN','11465420153');
    go
    CREATE UNIQUE NONCLUSTERED INDEX [aioleclient1] ON [dbo].[oleclient]
    [client] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    GO
    CREATE TABLE [dbo].[Htable1](
    [amount] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [cur_amount] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [value_2] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [value_3] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [currency] [varchar](25) NOT NULL DEFAULT (' '),
    [client] [varchar](25) NOT NULL DEFAULT (' '),
    [asset_id] [varchar](25) NOT NULL DEFAULT (' '),
    [depr_book_id] [varchar](25) NOT NULL DEFAULT (' '),
    [input_id] [bigint] NOT NULL DEFAULT ((0)),
    [amount_type] [char](25) NOT NULL DEFAULT (' '),
    [reval_year] [int] NOT NULL DEFAULT ((0)),
    [trans_seq] [int] NOT NULL DEFAULT ((0)),
    [sequence_no] [int] NOT NULL DEFAULT ((0)),
    [at_trans_date] [datetime] NOT NULL DEFAULT (CONVERT([datetime],'19000101',(112))),
    [agrtid] [bigint] IDENTITY(1,1) NOT NULL,
    UNIQUE NONCLUSTERED 
    [agrtid] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    INSERT INTO Htable1 (at_trans_date,amount,amount_type,asset_id,client,cur_amount,currency,depr_book_id,input_id,reval_year,sequence_no,trans_seq,value_2,value_3) 
     VALUES ('20140603' ,0.00000000,'GLN','BM','EN',0.00000000,'GBP','BUSINESS',563,0,29,0,0.00000000,0.00000000 ) 
    GO
    INSERT INTO Htable1 (at_trans_date,amount,amount_type,asset_id,client,cur_amount,currency,depr_book_id,input_id,reval_year,sequence_no,trans_seq,value_2,value_3) 
     VALUES ('20140603' ,0.00000000,'GLN','BM','EN',0.00000000,'GBP','BUSINESS',563,0,30,0,0.00000000,0.00000000 ) 
    GO
    --=================================================================================
    -- The following query takes 15 minutes on my computer to give an execution plan. Fetching the data takes no additional time.
    -- removing one table (CACHED88) from the query brings the time down to 59 seconds.
    -- removing one more (CACHED87) brings it down to 4 seconds.
    -- adding the hint "option (QUERYTRACEON 9481)" to the first case, brings it down from 15 minutes to less than one second!
    SELECT 
           CACHED83.amount - ( CACHED76.amount + CACHED75.amount + CACHED85.amount + CACHED86.amount + CACHED87.amount + CACHED88.amount) AS amount, 
           CACHED83.amount - ( CACHED76.amount + CACHED75.amount + CACHED85.amount + CACHED86.amount + CACHED87.amount + CACHED88.amount) AS cur_amount, 
           c.currency    
    FROM 
           Htable1   tab1 , 
           Htable1   CACHED83 , 
           Htable1   CACHED76 ,
           Htable1   CACHED75 ,
           Htable1   CACHED85 ,
           Htable1   CACHED86 ,
           Htable1   CACHED87 ,
           Htable1   CACHED88 ,
           oleclient c  
    WHERE 
           tab1.client = c.client AND
           tab1.amount_type = 'GLN' AND 
           tab1.asset_id     = CACHED83.asset_id AND 
           tab1.depr_book_id = CACHED83.depr_book_id AND        
           tab1.client       = CACHED83.client AND 
           tab1.input_id     = CACHED83.input_id AND 
           tab1.reval_year   = CACHED83.reval_year AND     
           tab1.trans_seq    = CACHED83.trans_seq AND 
           tab1.sequence_no  = CACHED83.sequence_no AND 
           tab1.asset_id     = CACHED76.asset_id AND  
           tab1.depr_book_id = CACHED76.depr_book_id AND 
           tab1.client       = CACHED76.client AND 
           tab1.input_id     = CACHED76.input_id AND  
           tab1.reval_year   = CACHED76.reval_year AND 
           tab1.trans_seq    = CACHED76.trans_seq AND 
           tab1.sequence_no  = CACHED76.sequence_no AND 
           tab1.asset_id     = CACHED75.asset_id AND 
           tab1.depr_book_id = CACHED75.depr_book_id AND 
           tab1.client       = CACHED75.client AND      
           tab1.input_id     = CACHED75.input_id AND 
           tab1.reval_year   = CACHED75.reval_year AND 
           tab1.trans_seq    = CACHED75.trans_seq AND       
           tab1.sequence_no  = CACHED75.sequence_no AND 
           tab1.asset_id     = CACHED85.asset_id AND 
           tab1.depr_book_id = CACHED85.depr_book_id AND        
           tab1.client       = CACHED85.client AND 
           tab1.input_id     = CACHED85.input_id AND 
           tab1.reval_year   = CACHED85.reval_year AND     
           tab1.trans_seq    = CACHED85.trans_seq AND 
           tab1.sequence_no  = CACHED85.sequence_no AND 
           tab1.asset_id     = CACHED86.asset_id AND 
           tab1.depr_book_id = CACHED86.depr_book_id AND 
           tab1.client       = CACHED86.client AND 
           tab1.input_id     = CACHED86.input_id AND  
           tab1.reval_year   = CACHED86.reval_year AND 
           tab1.trans_seq    = CACHED86.trans_seq AND 
           tab1.sequence_no  = CACHED86.sequence_no AND  
           tab1.asset_id     = CACHED87.asset_id AND 
           tab1.depr_book_id = CACHED87.depr_book_id AND 
           tab1.client       = CACHED87.client AND      
           tab1.input_id     = CACHED87.input_id AND 
           tab1.reval_year   = CACHED87.reval_year AND 
           tab1.trans_seq    = CACHED87.trans_seq AND       
           tab1.sequence_no  = CACHED87.sequence_no  AND  
           tab1.asset_id     = CACHED88.asset_id AND 
           tab1.depr_book_id = CACHED88.depr_book_id AND 
           tab1.client       = CACHED88.client AND      
           tab1.input_id     = CACHED88.input_id AND 
           tab1.reval_year   = CACHED88.reval_year AND 
           tab1.trans_seq    = CACHED88.trans_seq AND       
           tab1.sequence_no  = CACHED88.sequence_no  
    --  option (QUERYTRACEON 9481)         

    Reading "What's new in Sql Server 2014" (http://msdn.microsoft.com/en-us/library/bb510411.aspx#CE). I see that  it says:
    New Design for Cardinality Estimation
    The cardinality estimation logic, called the cardinality estimator, is re-designed in SQL Server 2014 to improve the quality of query plans, and therefore to improve query performance. The new cardinality estimator incorporates assumptions and algorithms
    that work well on modern OLTP and data warehousing workloads. It is based on in-depth cardinality estimation research on modern workloads, and our learnings over the past 15 years of improving the SQL Server cardinality estimator. Feedback from customers shows
    that while most queries will benefit from the change or remain unchanged, a small number might show regressions compared to the previous cardinality estimator. For performance tuning and testing recommendations, seeCardinality
    Estimation (SQL Server).
    I states that a "small number of queries might show regressions". To mee the regression is a showstopper and seems to have to do with complexity. I found one query reported by Juha Salo (bug 893758) that possibly could have to do with the same thing.
    It is a query with many joins. Simplifying the query by removing one of the joins, makes it work fine. The query documented in his report does not need any setup as it is a query on system tables as sys.indexes and sys.index_columns.
    I quote:
    There is a huge difference in performance for the following query between compatibility level 120 and the lower levels:
    dbcc dropcleanbuffers
    SELECT i.NAME
    FROM sys.indexes i
    INNER JOIN sys.index_columns k ON i.object_id = k.object_id
    AND i.index_id = k.index_id
    INNER JOIN sys.objects o ON i.object_id = o.object_id
    AND k.object_id = o.object_id
    INNER JOIN sys.index_columns k1 ON i.object_id = k1.object_id
    AND i.index_id = k1.index_id
    AND k1.key_ordinal = 1
    INNER JOIN sys.index_columns k2 ON i.object_id = k2.object_id
    AND i.index_id = k2.index_id
    AND k2.key_ordinal = 2
    INNER JOIN sys.index_columns k3 ON i.object_id = k3.object_id
    AND i.index_id = k3.index_id
    AND k3.key_ordinal = 3
    INNER JOIN sys.index_columns k4 ON i.object_id = k4.object_id
    AND i.index_id = k4.index_id
    AND k4.key_ordinal = 4
    INNER JOIN sys.index_columns k5 ON i.object_id = k5.object_id
    AND i.index_id = k5.index_id
    AND k5.key_ordinal = 5
    INNER JOIN sys.index_columns k6 ON i.object_id = k6.object_id
    AND i.index_id = k6.index_id
    AND k6.key_ordinal = 6
    INNER JOIN sys.index_columns k7 ON i.object_id = k7.object_id
    AND i.index_id = k7.index_id
    AND k7.key_ordinal = 7
    INNER JOIN sys.columns c1 ON o.object_id = c1.object_id
    AND k1.column_id = c1.column_id
    INNER JOIN sys.columns c2 ON o.object_id = c2.object_id
    AND k2.column_id = c2.column_id
    INNER JOIN sys.columns c3 ON o.object_id = c3.object_id
    AND k3.column_id = c3.column_id
    INNER JOIN sys.columns c4 ON o.object_id = c4.object_id
    AND k4.column_id = c4.column_id
    INNER JOIN sys.columns c5 ON o.object_id = c5.object_id
    AND k5.column_id = c5.column_id
    INNER JOIN sys.columns c6 ON o.object_id = c6.object_id
    AND k6.column_id = c6.column_id
    INNER JOIN sys.columns c7 ON o.object_id = c7.object_id
    AND k7.column_id = c7.column_id
    Can be run in any database. In our case we have a legacy database with almost 10 000 (ten thousand) tables. In that kind of database the query just freezes fully utilizing a single cpu core.
    If compatibility level is switched to 110 then query performs as it should.

  • Translation to local currency in logical database FTI_TR_CASH_FLOWS

    Hi,
    I created an infoset based on logical database FTI_TR_CASH_FLOWS. Based on this infoset I created a query. One of the fields I chose is "Payment Amount in Local Currency". In the query the translation to local currency is done using a currency rate that is incorrect. For example I show in the report a future flow and I expect the translation to be done using the latest rate becuase the flow is in the future -what actually happens is that the translation is done using an older rate previous to the latest rate. I also show the field "Payment Amount in Display Currency" which is translated correctly.
    Does anyone know this problem?
    Thanks,
    Tal

    I see that the amount in LC is taken from table TRDT_FLOW that is why it is not updated in the report although new currency rates were entered.
    Is this a bug?
    Tal

  • Bridge 5 operational bug?

    BACKGROUND:  I have reconstructed the file arrangement of my 8 tera-byte, 630,00 image photographic archive.  All directories had BridgeCache files fully created.  The two master caches (to address the 500,000 image "limit") were constructed on an external esata/usb drive.  The option choses for the "Build Cache for Folders" had the "Export Cache to Folders" disabled under the assumption that it was not necessary since the master cache was being rebuilt from the folder BridgeCache files.   The reconstruction was done on a laptop running Bridge 5 under the Win XP operating system.  This multiple week operation completed successfully and the generated master casche systems work on both the WinXP lap-top as well as my main Win7 64bit workstation - with one excpetion.  This exception (I think) is a bug in Bridge.
    DESCRIPTION of OPERATION:  I invoke Bridge in multiple ways.
    1. Start bridge initiated from the desk-top icon.
    2. Start bridge by drag-and-drop of the .BridgeCacheT file onto the desk-top icon.
    3. Start bridge by double clicking on the .BridgeCacheT file (associated with Bridge5)
    4. Start bridge by drag-and-drop of an image file onto the desk-top icon.
    5. Start bridge from another programme using the Win API function "ShellExecute" using the Bridge.exe path name and a path to a selected image (or .BridgeCachet) file as arguments.
    6. Start bridge from the Command Prompt using the Bridge.exe path name and a path to a selected image  (or .BridgeCachet) file as arguments.
    If Bridge is started using 1,2,3 or 4 above, the operation is as expected for all rebuilt directories - thumbs are shown "very fast" and are properly constructed with whatever crop and other correction was made in Adobe Camera Raw.  This action is noted on both the Win7 workstation as well as the WinXP laptop.
    If bridge is started by method 5 or 6, the operation is varied but identical on both computers.  If I access a directory that was created AFTER the cache rebuild described above (i.e. a new photography project), operation is fast and works rapidly with all thumbs and preview images being displayed properly.
    If I access a directory (using 5 or 6) that was created by by the rebuild but has not yet been re-processed the following is noted:
    a. The Build Criteria stage of Bridge takes a long time searching all files in the directory.
    b. Thumnail and preview extraction start immediately after the Build Criteria stage is completed  (in spite of having the images already an properly in the master cache and in the .BridgeCache file);  Initial thumb display seems to be embedded thumbs in the image file - which is "fixed" during the processing.
    Both of the above are very noticeable when I view the network activity with Windows Task Manager.
    If I terminate Bridge at this point with the caches not reconstructed, I can restart Bridge by methods 1, 2, 3, or 4 above and the fully built thumbs and preview images are "instantly" available.  If I then restart Bridge using methods 5 or 6 above, the thumb/preview images rebuild takes place again - from where it left off in the previous attempt.
    If I allow this rebuild for the directory to go to completion, I can restart bridge by any of the above 6 methods and the "reconstructed" images are immediately available.  The only network activity noted is a very low level doing what I assume to be a consistency/currency check for "unexpected" image file changes.
    Browsing the master cache 256 and 1024 directories with the FastStone viewer before and after the rebuild yield no identifiable changes to the thumb nor preview files.
    THE BUG:  It seems that, if bridge is started from the command prompt or by another programme, it may reprocess the images in a directory unexpectedly - in spite of the fact that starting bridge with normal desk-top icon or drag and drop do not cause the directory to be reprocessed.
    My assumption is that ANY of the above 6 methods of invoking Bridge 5 SHOULD BE identical in operation.
    I also notice that, if I start Bridge with the WinAPI ShellExecute function with ONLY the path the Bridge.exe (no file is specified), Bridge will start cleanly without an attempt to build any thumb/preview images.
    It seems to me that the problem is associated with having a file name passed as an argument when using the Command Prompt or the WinAPI functions.
    Thank you,
    tony

    It really would be nice if Adobe could provide a "fixit tool" that would update the cache structure to flag the various constructed cache directories as current and up to date in such a way that a rebuild and data duplication would not be done.  This would go a long way to making cache rebuilds from the .BridgeCache files a useful tool.
    P.S.  This file processing problem did not happen when CS5 was released and I migrated from Bridge CS4 to CS5.  Hopefully a fix can be provided.

  • [Master-Detail] JBO-35007: Row currency has changed since...

    Hi,
    I have a very annoying problem in ADF Faces with row currency:
    I have a "Master table - Detail table" relationship on a very simple test page based on the SRDemo's PRODUCTS and SERVICE_REQUESTS tables. Everything was done automatically: create Entities from Tables, create the SLSB facade, and create the tables on the page via dragging the accessor.
    Then I added a "Refresh" button on the page whose action handler is:
        public String btnRefresh_action() {
            DCIteratorBinding iterMaster = (DCIteratorBinding)bindings.get("findAllProductsIter");
            String rowKeyStrMaster = iterMaster.getCurrentRowKeyString();
            DCIteratorBinding iterDetail = (DCIteratorBinding)bindings.get("serviceRequestListIterator");
            String rowKeyStrDetail = iterDetail.getCurrentRowKeyString();
            iterMaster.executeQuery();
            iterMaster.setCurrentRowWithKey(rowKeyStrMaster);
            iterDetail.setCurrentRowWithKey(rowKeyStrDetail);
            return null;
        }And here's where the problem kicks in:
    1. I select the product with ID=100 (because it has multiple details).
    2. I select some detail. Say, the second one.
    3. I click on the "Refresh" button.
    4. The button's handler re-executes the iterator and restores the current rows on the tables. The page loads okay and the rows that were selected prior to clicking on the button continue to be selected appropriately.
    5. Now I click on the "Refresh" button again. And I get the error: "JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[1 ]".
    Please, help. What should I do to prevent this error from happening? It it a bug in my code or a bug in the framework? When I only have one table (and not a Master-Detail relationship), everything works. The problem comes from the Detail table.
    We use EJB3 + JPA + ADF Faces. I tested the problem on JDev 10.1.3.3.0.4157 and JDev 10.1.3.2.0.4066.
    Best regards
    Bisser

    no post......
    Edited by: BaiG on Nov 2, 2010 2:21 PM

  • Intermittent JBO-35007 (Row currency has changed...) and coordination

    I get an intermittent JBO-35007: Row currency has changed since the user interface was rendered. It is not repeatable - ie. if the user leaves the application and starts it again, whatever they were doing works ok. It happens about every hour when the user is doing constant testing. It is somewhat repeatable if you go into one of the screens it happens on, then leave the application open and do something else entirely for 30 - 40 minutes, when you come back and select a different record (using select radio button) it occurs, but even this is not always repeatable. It happens on our screens where we have master and details displayed on the one screen and both master and details are displayed as tables (ie. multiple records). The user says it happens most often when he is using the drop down on the master list that lets you see the next ten records.
    When the problem happens the master and detail records no longer coordinate, so the user can add a detail record to a master different from the one it appears to be adding too. I have told him to logout after a JBO-35007, but he doesn't think that the users will always remember to do that.
    We've just disabled the back button, although the tester is sure he wasn't using that. We've changed session timeout on web.xml so that it will timeout after 20 minutes of inactivity, so it can no longer occur after 30 minutes of inactivity, but it's still happening after that.
    Any suggestions would be greatly appreciated. Thanks.

    I've been assisting Anita and her team in tracking down this issue with JBO-35007 and then JBO-25013. Her team has done an excellent job in nailing this issue down, the problem is surprisingly simple to replicate once you know how, and can now be reproduced consistently.
    Anita and I would like ask for some assistance and advice from potentially the JDev crew and others on have they found a solution to this, and potentially strategies to reduce the issue. Anita has raised an SR, but as getting through 1st level support can be a pain in the butt, I'd thought we'd try a 2 pronged attack and see if we can get assistance from OTN.
    This is the scenario:
    1) There are 2 simple ADF Faces web pages, the 1st with a table, record selector and "edit" submit button to navigate to the 2nd screen. The 2nd screen is an input form for editing the record selected from the 1st page and a submit button to return to the 1st screen. Let's call these pages "view" and "edit" for simplicity.
    2) On the view page, the table selector has autoSubmit="true". This is important.
    3) On the view page there are multiple records showing. For simplicity we'll refer to three records X, Y and Z. By default on entry to the screen, record X is selected.
    4) The user on the view screen selects record Y via the table record-selector, and then presses the edit submit button. A side affect of selecting record Y with the autoSubmit is the underlying iterator row currency is updated, now pointing at Y.
    5) Today, the internet is running a bit slow for whatever reason, and the ADF Faces application doesn't reply instantly by showing the edit page. The user, a bit frustrated with the experience, changes their mind, and still with the view page showing because it hasn't updated yet, decides to pick record Z via the table record-selector, and presses the edit submit button again.
    6) This is actually two actions, as the table-selector's autosubmit results in another request to the midtier to update the iterator's row currency, and then the edit button to navigate to the edit page.
    7) Eventually the application responds, and it shows the edit page for record Y.
    It's a bit hard to guess here if it should actually show record Y or record Z. I don't mean this is a bug, but rather should it logically show record Y because that was the first user's action, or record Z because that's what the user selected. No matter, lets just accept the user sees record Y (possibly incorrectly thinking they're seeing record Z) and start updating the record.
    8) The user then presses the submit button on the edit page showing record Y, and JBO-35007 and JBO-25013 is thrown.
    Why is JBO-35007 thrown? I'd suggest that the selecting of record Z in step 5 & 6 is successfully updating the iterator's row currency, even though the edit page has yet to be fully rendered on the client's browser. It appears that the midtier has no way of knowing that the client has yet received the edit page, so it blindly accepts new requests from the client.
    This is actually similar to the back button problem, in terms of communications with the midtier. The solution to the back button problem at this stage appears to be "user education". However our problem is worse than the back button issue, as slow internet connections are a reality beyond their control, and expecting the users not to double click is stretching the "user education" solution thing a bit too far IMHO.
    A couple of separate points I'd like to raise:
    1) As for point 2 above, the table has autoSubmit set to true. This is the route of the problem and as such could be set to false. However when generating master-table-detail-table pages in JDev, typically you want the master's autoSubmit = true such that the detail table automatically refreshes when a new master record is selected. If we say no to autoSubmit, this means no to master-table-detail-table and is that reasonable as that is a feature in JDev.
    2) However, if the autoSubmit is set to false, the problem is not reproducible. I'd suggest when the user clicks on the submit button on the edit page in this case, the submit button has some sort of functionality to stop the user selecting the button twice until the midtier responds. Is this correct? Potentially there is Javascript functionality doing this? I'm aware on other Web-developer forums of discussions on the <body> tag onload & unload Javascript events to enable/disable buttons to stop multiple submit calls to the midtier. Does the ADF Faces command buttons do this? If such a feature exists, cannot this same functionality be added to the autoSubmit?
    3) We could turn off the tokenValidation in both pageDef, or a combination, but I think this a case where we do want the tokenValidation as the midtier and client are confused.
    4) JDev's HTTP Analyzer can assist in showing what's flowing between the browser and midtier, in particular that you can see the additional autoSubmit of step 5 & 6 sent from the browser.
    5) This issue becomes more prevalent on a slow internet connection. It is hard to produce "naturally" on a fast JDev install. However it can be reproduced by placing a breakpoint on the <afh:html> tag of the edit page and running the test in debug mode. When the breakpoint is reached on first navigating to the edit page, you can return to your browser, which is still showing the view page, select another record and submit, return to the debugger, and press continue.
    As mentioned if anybody could lend support with this issue it would be appreciated. Is there a solution to this? Is this is a bug? Any other thoughts appreciated.
    Thanks & regards,
    CM.
    PS. Anita, if you could add any clarifications if needed please.

  • F110 - Payment in foreign Currency

    Dear Experts,
    We have a strange case, and requesting the SAP behaviour for this case.
    The document (Invoice posted) in "SDR" special Dinar Rate (not standard currency), and the Local Currency is BHD - Bahraini Dinar, and wanted to pay in Foreign Currency in "EUR". mainted the payment currency in the document.
    As far as I know system will check exchange rates for conversion from SDR - BHD and then BHD - EUR, so maintaining these two combinations are enough.
    But strangely I am getting error while processing F110 automatic payment program, system is giving error "Enter the Rate EUR/SDR rate type M for 04.08.2010 in the system". Message No. SG 105
    I am facing this error after we upgraded to ECC 6.0 from ERP 4.7 in March 2010.  Paying in EUR is rarely happens.
    Awaiting your kind reply.
    Regards,
    Francis

    Hi Sayeed,
    As far as I know we don't need to maintain the direct relationship between SDR vs EUR as the system logic for currency conversion is from Document currency to Local currency and Local currency to Payment currency.
    We hadn't had such issue before, we are facing after we upgrade to ECC 6.0.
    Please refer to this note, I guess it is a bug in program. Refer Note: 1413445.
    Regards,
    Francis

  • [Bug: JClient tree binding] Workaround for 'random' collapsing of branches

    Hi all.. For those of you who have been bothered by a bug in the JClient tree binding model regarding (seemingly) random collapsing of branches, I have a small workaround which may brighten your day. I know it brightened mine. :)
    Anyways, here's my situation:
    - A JTree with a master VO ("MasterView", for the top) and a detail VO ("DetailView", for the 'body'), recursively bound.
    - A JComboBox bound to a VO ("TopsView" or whatever), which is used to 'select a tree'
    - When a the currency of TopsView is changed, the selected row's ID is used to build a new tree. I use my own simple synchronizing mechanism, so I can do some additional checks. I suppose you could make MasterView a detail of TopsView, but that's not really important.
    masterView.setWhereClause("ID = " + selID);
    masterView.executeQuery();At this point, the tree will automatically be rebuilt.
    However, based on my experiences, I figure that this is not really the way the JDev guys pictured how I'd work because there's a pretty huge bug which at some point pretty much makes the tree useless (or 'act weird' to say the least).
    Here's a description of how to reproduce the bug and some of my observations. I will refer to the collection of currently displayed nodes/records as 'tree'.
    1. When you first expand certain branches in the current tree, all goes well. No problems.
    2. Next, you use the JComboBox to select another tree. (The new tree will appear totally collapsed.)
    3. At this point, you will also be expanding branches 'in that tree', 'for the first time'.
    4. After that, you switch back to the first tree.
    5. Now it becomes interesting: when you expand ANY branch that you previously expanded in this tree, the bug will surface (details will follow). When you expand branches that you DID NOT expand during your last visit to this tree, all goes well -- no problems.
    Note that re-expanding a branch after manually collapsing it, does not cause the bug. The key is that you expand a branch for the first time during a 'visit' to this tree (ie, so that it has to gather it's child nodes).
    Details about the bug:
    - The problem surfaces when expanding certain branches. (See above.)
    - Effects will vary from collapsing different branches under the same parent node to collapsing the entire tree.
    - The selection in the JTree component (or its selection model, if you will) will also be canceled.
    Observations:
    - It seems that JClient was not designed to handle multiple trees (as described above). It appears that, before the newly selected tree is built, the old tree has not been properly cleaned up. By this I mean the collection of JUTreeNodeBinding objects, which continue to refer to DefaultMutableTreeNodeBinding objects of the destroyed tree. In effect, these orphaned objects continue to work their magic in the background and will influence the JTree and its associated objects in a way so that this problem (and possibly others) surfaces.
    The workaround I will present below is designed to suppress this problem. It does not deal with orphaned objects in a proper way, it will merely partially suppress their functionality.
    How to suppress the bug:
    - In case you haven't done so already, you have to copy the source file of oracle.jbo.uicli.jui.JUTreeNodeBinding into your project directory and then make small modification to it.
    - On line 482 (if I'm not mistaken), you will see //if (al.size() > 0) Change it to if (!(mTreeNode.getParent() == null && getParent() != null)) Now the enclosed code will only be executed when the tree is fully synchronized (as in: the 'tree' of JUTreeNodeBinding objects has the same structure as the 'current tree' of DefaultMutableTreeNodeBinding objects).
    In a nutshell, it checks whether the parents of this JUTreeNodeBinding object and the associated DefaultMutableTreeNode object are not null. Because in case it concerns an 'orphaned' JUTreeNodeBinding object, the parent of its associated DefaultMutableTreeNode object will be null. However, in case it concerns the tree's root node, both parents will be null, in which case this condition will have to evaluate to true as well.
    I hope that this information will be of use to others :) and that possibly someone of the JDev team could comment on this matter. Thanks.

    One question though. What exactly do you mean by 'copy
    the source file of
    oracle.jbo.uicli.jui.JUTreeNodeBinding into your
    project directory'.. would I need to change the package
    name of this binding, and modify the client code
    somewhere to have it use my modified version? Or will
    it use this local copy instead of the original one?The simplest way to go is to create a new (empty) class in your project, which is to be located in the package "oracle.jbo.uicli.jui", and name it "JUTreeNodeBinding". Next, open the source of the original JUTreeNodeBinding class and copy-paste it into your newly created class in JDeveloper.
    Now, when you run your application, it will use your 'custom' version of JUTreeNodeBinding, while it will function exactly the same. You can make any modifications, like the one I suggested in my original post, in this class.
    Good luck.

Maybe you are looking for

  • Macbook Pro beeping when waking from sleep

    I have just upgraded from Lion to Moutain Lion. Before upgrading I did all the usual disk check and stuff. But currently when my computer wakes up from sleep there is a loud beeping and black screen, I have to force shut down to use the notebook. Thi

  • Connecting MBA to our small business server 2003

    Hi guys, I just got a new 13inch MBA. I would like to use this at work for my exchange server email etc. How do I put the MBA onto our .local domain and we use a VPN for remote connectivity? This is my first MacBook so I'm finding my feet with the wh

  • Ipod music storage

    Where do all my songs vanish to? Itunes said it sent 327 songs to my ipod but it only shows 59 of them. I have a 2gb ipod nano and I didnt exced the gb limit? Please someone help?   Windows XP  

  • Avoiding unhandled error page branching

    Hi all, I was trying to avoid those situations where the user is brought to that spartan error page when an "unhandled" exception occurs, such as a constraint violation. In such situations one should first check whether an identical unique key is alr

  • Lenovo S205 flash performance issue

    Hello All, I have IdeaPad s205 netbook with e-450 onboard. For some reason adobe flash video playback is extreamly laggy in all browsers except Internet Explorer. What can be the reason of this and how this can be fixed? Windows 7 x64 Home Premium SP