Performance problem with more than one COUNT(DISTINCT ...) in a query

Hi,
(I hope this is the good forum).
In the following query, I have 2 Count Distinct on 2 different fields of the same table.  Execution time is okay (2 s) with one or the other COUNT(DISCTINCT ...) in the SELECT clause, but is not tolerable (12 s) with both together in the query! I have
a similar case with 3 counts: 4 s each, 36 s when together!
I've looked at the execution plan, and it seems that with two count distinct, SQL server sorts the table twice before joining the results.
I do not have much experience with SQL server optimization, and I don't know what to improve and how. The SQL is generated by Business Objects, I have few possibilities to tune it. The most direct way would be to execute 2 different queries, but I'd like
to avoid it.
Any advice?
SELECT
  DIM_MOIS.DATE_DEBUT_MOIS,
  DIM_MOIS.NUM_ANNEE_MOIS,
  DIM_DEMANDE_SCD.CAT_DEMANDE,
  DIM_APPLICATION.LIB_APPLICATION,
  DIM_DEMANDE_SCD.CAT_DEMANDE ,
  count(distinct FAITS_DEMANDE.NB_DEMANDE_FLUX),
  count(distinct FAITS_DEMANDE.NB_DEMANDE_RESOL_NIV1)
FROM
  ALIM_SID.DIM_MOIS INNER JOIN ALIM_SID.DIM_JOUR ON (DIM_JOUR.SEQ_MOIS=DIM_MOIS.SEQ_MOIS)
   INNER JOIN ALIM_SID.FAITS_DEMANDE ON (FAITS_DEMANDE.SEQ_JOUR=DIM_JOUR.SEQ_JOUR)
   INNER JOIN ALIM_SID.DIM_APPLICATION ON (FAITS_DEMANDE.SEQ_APPLICATION=DIM_APPLICATION.SEQ_APPLICATION)
   INNER JOIN ALIM_SID.DIM_DEMANDE_SCD ON (FAITS_DEMANDE.SEQ_DEMANDE_SCD=DIM_DEMANDE_SCD.SEQ_DEMANDE_SCD)
WHERE
  ( ( DIM_MOIS.NUM_ANNEE_MOIS ) >201301
GROUP BY
  DIM_MOIS.DATE_DEBUT_MOIS,
  DIM_MOIS.NUM_ANNEE_MOIS,
  DIM_DEMANDE_SCD.CAT_DEMANDE,
  DIM_APPLICATION.LIB_APPLICATION

Here is the script, nothing original. Hope this helps.
-- Fact table :
-- foreign keys begin by FK_,
-- measures to counted (COUNT DISTINCT) begin with NB_
CREATE TABLE [ALIM_SID].[FAITS_DEMANDE](
    [SEQ_JOUR] [int] NOT NULL,
    [SEQ_DEMANDE] [int] NOT NULL,
    [SEQ_DEMANDE_SCD] [int] NOT NULL,
    [SEQ_APPLICATION] [int] NOT NULL,
    [SEQ_INTERVENANT] [int] NOT NULL,
    [SEQ_SERVICE_RESPONSABLE] [int] NOT NULL,
    [NB_DEMANDE_FLUX] [int] NULL,
    [NB_DEMANDE_STOCK] [int] NULL,
    [NB_DEMANDE_RESOLUE] [int] NULL,
    [NB_DEMANDE_LIVREE] [int] NULL,
    [NB_DEMANDE_MEP] [int] NULL,
    [NB_DEMANDE_RESOL_NIV1] [int] NULL,
 CONSTRAINT [PK_FAITS_DEMANDE] PRIMARY KEY CLUSTERED
    [SEQ_JOUR] ASC,
    [SEQ_DEMANDE] ASC,
    [SEQ_DEMANDE_SCD] ASC,
    [SEQ_APPLICATION] ASC,
    [SEQ_INTERVENANT] ASC,
    [SEQ_SERVICE_RESPONSABLE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
 CONSTRAINT [AK_AK_FAITS_DEMANDE_FAITS_DE] UNIQUE NONCLUSTERED
    [SEQ_JOUR] ASC,
    [SEQ_DEMANDE] ASC,
    [SEQ_DEMANDE_SCD] ASC,
    [SEQ_APPLICATION] ASC,
    [SEQ_INTERVENANT] 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
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_APPLICATION] FOREIGN KEY([SEQ_APPLICATION])
REFERENCES [ALIM_SID].[DIM_APPLICATION] ([SEQ_APPLICATION])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_APPLICATION]
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE] FOREIGN KEY([SEQ_DEMANDE])
REFERENCES [ALIM_SID].[DIM_DEMANDE] ([SEQ_DEMANDE])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE]
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE_SCD] FOREIGN KEY([SEQ_DEMANDE_SCD])
REFERENCES [ALIM_SID].[DIM_DEMANDE_SCD] ([SEQ_DEMANDE_SCD])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE_SCD]
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_INTERVENANT] FOREIGN KEY([SEQ_INTERVENANT])
REFERENCES [ALIM_SID].[DIM_INTERVENANT] ([SEQ_INTERVENANT])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_INTERVENANT]
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_JOUR] FOREIGN KEY([SEQ_JOUR])
REFERENCES [ALIM_SID].[DIM_JOUR] ([SEQ_JOUR])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_JOUR]
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_SERVICE_RESPONSABLE] FOREIGN KEY([SEQ_SERVICE_RESPONSABLE])
REFERENCES [ALIM_SID].[DIM_SERVICE] ([SEQ_SERVICE])
GO
ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_SERVICE_RESPONSABLE]
GO
-- not shown : extended properties
-- One of the dimension  tables (they all have a primary key named SEQ_)
CREATE TABLE [ALIM_SID].[DIM_JOUR](
    [SEQ_JOUR] [int] IDENTITY(1,1) NOT NULL,
    [SEQ_ANNEE] [int] NOT NULL,
    [SEQ_MOIS] [int] NOT NULL,
    [DATE_JOUR] [date] NULL,
    [CODE_ANNEE] [varchar](25) NULL,
    [CODE_MOIS] [varchar](25) NULL,
    [CODE_SEMAINE_ISO] [varchar](25) NULL,
    [CODE_JOUR_ANNEE] [varchar](25) NULL,
    [CODE_ANNEE_JOUR] [varchar](25) NULL,
    [LIB_JOUR] [varchar](25) NULL,
    [LIB_JOUR_COURT] [varchar](25) NULL,
    [JOUR_OUVRE] [tinyint] NULL,
    [JOUR_CHOME] [tinyint] NULL,
 CONSTRAINT [PK_DIM_JOUR] PRIMARY KEY CLUSTERED
    [SEQ_JOUR] 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
ALTER TABLE [ALIM_SID].[DIM_JOUR]  WITH CHECK ADD  CONSTRAINT [FK_DIM_JOUR_DIM_ANNEE] FOREIGN KEY([SEQ_ANNEE])
REFERENCES [ALIM_SID].[DIM_ANNEE] ([SEQ_ANNEE])
GO
ALTER TABLE [ALIM_SID].[DIM_JOUR] CHECK CONSTRAINT [FK_DIM_JOUR_DIM_ANNEE]
GO
ALTER TABLE [ALIM_SID].[DIM_JOUR]  WITH CHECK ADD  CONSTRAINT [FK_DIM_JOUR_DIM_MOIS] FOREIGN KEY([SEQ_MOIS])
REFERENCES [ALIM_SID].[DIM_MOIS] ([SEQ_MOIS])
GO
ALTER TABLE [ALIM_SID].[DIM_JOUR] CHECK CONSTRAINT [FK_DIM_JOUR_DIM_MOIS]
GO

Similar Messages

  • Problem with more than one item in a track

    DVDSP 4.0.2 / OSX.4.2 I've built a DVD with several tracks. In each track I've placed several .m2v files, one after another. Finished build plays fine on my Mac and on one of my stand alone DVD players. But on another stand alone (Sony DVP-S360) something very odd happens. DVD begins to play just fine, but whenever it encounters a track with more than one source file, it will play until it gets to the spot in the program where the second source file is in the track and then it hangs and won't do anything. I'm just curious if anyone has any insight into this problem. Is it a DVDSP conflict thing with certain players? Or is this Sony player just not capable of playing a DVD built this way? Thanks.

    This page here:
    http://www.videohelp.com/dvdplayers.php?DVDnameid=428&Search=Search&
    has someone talking about finally getting burned DVDs to work, which suggests they previously had problems. I can't think why the track would not seem like continuous video, as if it had always been that way. Our Sony DVD player at work seems sensitive to higher data rates. What data rate did you use?

  • RegionRenderer encodeAll The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance.

    Hi,
    I am using JDEV 11.1.2.1.0
    I am getting the following error :-
    <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.
    Piece of code is for region is:-
       <f:facet name="second">
                                                <af:panelStretchLayout id="pa1"
                                                                       binding="#{backingBeanScope.Assign.pa1}">
                                                    <f:facet name="center">
                                                        <af:region value="#{bindings.tfdAssignGraph1.regionModel}" id="r1"
                                                                   binding="#{backingBeanScope.Assign.r1}"/>
                                                    </f:facet>
                                                </af:panelStretchLayout>
                                            </f:facet>
    How do I resolve it ?
    Thanks,

    Hi,
    I see at least 3 errors
    1. <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components.
    the page fragment should only have a single component under the jsp:root tag. If you see more than one, wrap them in e.g. an af:panelGroupLayout or af:group component
    2. SAPFunction.jspx/.xml" has an invalid character ".".
    check the document (you can open it in JDeveloper if the customization was a seeded one. Seems that editing this file smething has gone bad
    3. The expression "#{bindings..regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "pePanel") evaluated to null.
    "pageeditorpanel" does seem to be missing in the PageDef file of the page holding the region
    Frank

  • Get the data with more than one of the desired value

    Hi,
    I need to pull the records with more than one value of 'Other' on the delivery days fields.
    The delivery fields are mon,tue,wed,thu,fri and sat that tells the where the item will be delivered. The value can be Home, Work, or Other.
    Here is the Sample data:
    cust_id: 123
    item: newspaper
    mon: Home
    tue:Work
    wed: Other
    thu: Home
    fri: Other
    sat: Other
    And here is my query so far.
    select
    cust_id,
    item,
    mon,
    tue,
    wed,
    thu,
    fri,
    sat,
    sum(case when (del_mon = 'O' or del_tue ='O' or del_wed ='O' or del_thu ='O' or del_fri ='O' or del_sat='O') then 1
    else 0 end) as day_ctr
    from customer
    Could you please help me with the right formula I need to get this?
    Thank you in advance..

    First
    DESC customer
    Second
    Can you explain what you are trying with
    sum(case when (del_mon = 'O' or del_tue ='O' or del_wed ='O' or del_thu ='O' or del_fri ='O' or del_sat='O') then 1 else 0 end) as day_ctr
    Third
    Usually it's helpful a example of the result you want...
    Perhaps you want this
    select DECODE(mon,1,(select distinct mon from customer), 'OTHER') mon,
            DECODE(tue,1,(select distinct tue from customer), 'OTHER') tue,
            DECODE(wed,1,(select distinct wed from customer), 'OTHER') wed,
            DECODE(thu,1,(select distinct thu from customer), 'OTHER') thu,
            DECODE(fri,1,(select distinct fri from customer), 'OTHER') fri,
            DECODE(sat,1,(select distinct sat from customer), 'OTHER') sat from
    select
    COUNT(DISTINCT mon) mon,
    COUNT(DISTINCT tue) tue,
    COUNT(DISTINCT wed) wed,
    COUNT(DISTINCT thu) thu,
    COUNT(DISTINCT fri) fri,
    COUNT(DISTINCT sat ) sat
    from customer
    )

  • Create a dynamic search in JSP with more than one datasource

    Hello,
    In the ViewCiteria tag you can specify the datasource in which you want to place the criteria. Is it also possible to work with more than one datasource ?
    In my project I want one query form for specifying criteria for more than one datasource. When I send the query form, I want the right view criteria will be coupled with the right datasource.
    Has someone more experience with that ???
    Thanks!!!

    Hi,
    I think I got the same problem! I tried to combine all the tables in a new view and create a query on this view.
    But when I search and my result has to be one record from the main table, I get this record more than once.
    I tried to use distinct but that does not work because each column has a different value, so the record is never the same.
    I hope someone can help us!

  • Error while running spatial queries on a table with more than one geometry.

    Hello,
    I'm using GeoServer with Oracle Spatial database, and this is a second time I run into some problems because we use tables with more than one geometry.
    When GeoServer renders objects with more than one geometry on the map, it creates a query where it asks for objects which one of the two geometries interacts with the query window. This type of query always fails with "End of TNS data channel" error.
    We are running Oracle Standard 11.1.0.7.0.
    Here is a small script to demonstrate the error. Could anyone confirm that they also have this type of error? Or suggest a fix?
    What this script does:
    1. Create table object1 with two geometry columns, geom1, geom2.
    2. Create metadata (projected coordinate system).
    3. Insert a row.
    4. Create spacial indices on both columns.
    5. Run a SDO_RELATE query on one column. Everything is fine.
    6. Run a SDO_RELATE query on both columns. ERROR: "End of TNS data channel"
    7. Clean.
    CREATE TABLE object1
    id NUMBER PRIMARY KEY,
    geom1 SDO_GEOMETRY,
    geom2 SDO_GEOMETRY
    INSERT INTO user_sdo_geom_metadata (table_name, column_name, srid, diminfo)
    VALUES
    'OBJECT1',
    'GEOM1',
    2180,
    SDO_DIM_ARRAY
    SDO_DIM_ELEMENT('X', 400000, 700000, 0.05),
    SDO_DIM_ELEMENT('Y', 300000, 600000, 0.05)
    INSERT INTO user_sdo_geom_metadata (table_name, column_name, srid, diminfo)
    VALUES
    'OBJECT1',
    'GEOM2',
    2180,
    SDO_DIM_ARRAY
    SDO_DIM_ELEMENT('X', 400000, 700000, 0.05),
    SDO_DIM_ELEMENT('Y', 300000, 600000, 0.05)
    INSERT INTO object1 VALUES(1, SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(550000, 450000, NULL), NULL, NULL));
    CREATE INDEX object1_geom1_sidx ON object1(geom1) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    CREATE INDEX object1_geom2_sidx ON object1(geom2) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    SELECT *
    FROM object1
    WHERE
    SDO_RELATE("GEOM1", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE';
    SELECT *
    FROM object1
    WHERE
    SDO_RELATE("GEOM1", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE' OR
    SDO_RELATE("GEOM2", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE';
    DELETE FROM user_sdo_geom_metadata WHERE table_name = 'OBJECT1';
    DROP INDEX object1_geom1_sidx;
    DROP INDEX object1_geom2_sidx;
    DROP TABLE object1;
    Thanks for help.

    This error appears in GeoServer and SQLPLUS.
    I have set up a completly new database installation to test this error and everything works fine. I tried it again on the previous database but I still get the same error. I also tried to restart the database, but with no luck, the error is still there. I geuss something is wrong with the database installation.
    Anyone knows what could cause an error like this "End of TNS data channel"?

  • Send email from SAP with more than one attachment

    Hi all,
    How can i send email with more than one attachment and different types of document(doc,pdf,etc.) from SAP to external?
    Besr regards,
    Munur

    Hi,
    I use :
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    the main problem with different attachemts is to genereate the packing_list.
    the packing list is a kind of description of the data table... where ist the start  of an image, end, size...
    "Creation of the entry for the compressed attachment
            objpack-transf_bin = 'X'.                    " it could be an image
            objpack-head_num = lv_head_num_count .  " inital 1 each att  add 1
            objpack-head_start = 1.                     " fix
            objpack-body_start = gv_startnum.    " table with attachments  1. line one
            objpack-body_num = tab_lines.          " how many lines are in the table of attachment
            objpack-doc_size = tab_lines * 255.   " size of the  attachment...
           objpack-doc_type = lv_typ . " 'JPG'.
            objpack-obj_name = 'ATTACHMENT'.
            objpack-obj_descr = lv_stripped_name  " name of the JPG
       APPEND objpack.
       APPEND LINES OF lt_goscontent TO gt_maildata.  " data Table...
    bestreg
    robert

  • Spatial index creation for table with more than one geometry columns?

    I have table with more than one geometry columns.
    I'v added in user_sdo_geom_metadata table record for every column in the table.
    When I try to create spatial indexes over geometry columns in the table - i get error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 8
    ORA-06512: at line 1
    What is the the solution?

    I'v got errors in my user_sdo_geom_metadata.
    The problem does not exists!

  • Tax code with more than one tax rate

    Hi,
    I am using TAXINN procedure and I created on tax codes with more than one rate. i.e. for service tax I created  a tax code S1 with 3 rates as follows
    Acc. Key    Tax %      condition type
    VS9            12             JSE4
    VS0              2             JES4
    VSS              1             JHS4
    When I am trying to post a document with the above tax code the system is giving the following error message
    Tax code S1 may only contain one assignment line
    Message no. FF731
    Diagnosis
    For direct postings to tax accounts, only tax codes containing exactly one tax line may be used. Tax codes with several rates or a nondeductible portion are not allowed here.
    Procedure
    Use a different tax code.
    For direct postings to a tax account, you might have to define a separate tax code for which only one line with a percentage rate other than zero is active in percentage rate maintenance. All other lines must be inactive.
    To do this, choose Maintain entries (F5).
    Could you please let me know how to rectify this problem? I want to post 3 line items for each of base rate, Edu. Cess and Higher Edu.cess.
    Advance thanks for your help and
    Regards
    Koteswara Rao Padarti

    The problem is in the master data of the revenue account. the tax category should not be > and it should be *

  • Having with more than one clause

    Hi
    Is posssible to have a query with more than one clause in having condition
    Example In my query I have Count , Sum and AVG , I need to use 3 conditions in having, Is It possible ?
    Thank you in advance

    Hi,
    yes, in Having you can also use AND and OR.
    with x as (select 1 nr from dual)
    select nr
    from x
    group by nr
    having count(*) = 1
    and sum(nr) = 1Herald ten Dam
    http://htendam.wordpress.com

  • Create a logical column with more than one data source

    I'm having a problem to create a logical column with more than one data source in Siebel 7.8.
    What I want to do is the union of 2 physical tables in one logical table.
    For example, I have a "local_clients" table and a "abroad_clients" table. What I want is to have a logical table "clients" with the client data from the 2 tables.
    What I've tried is dragging the datasources I need onto the logical column.
    However this isn't working because it only retrieves the data from the first data source.

    Hi!
    I think it is not possible to do this just by dragging the columns to the logical table. A logical table can have more than one source, but I think each column must have just one direct source column.
    I'm not sure, but maybe you should do the UNION SQL to get the data of the two tables. In the physical layer, when you create a new physical table, it's possible to set the "table type" as a "SELECT". I didn't try that, but it seems that it's possible to have the union table in the physical layer.
    Bye.
    Message was edited by:
    user578388

  • Fill BEx Variable with more than one value via Custom Exit

    Dear SDN comunity,
    I want to fill a BEx Variable via a custom exit. My problem is, I don't know how to fill this variable with more than one value.
    I try to give you some background info based on an exaple:
    <u><b>Variable-Details</b></u>
    <b>Type of Variable:</b> Characteristic Value
    <b>Variable Name:</b> ZCCD
    <b>Description:</b> Company Code Selection
    <b>Processing by:</b> Custom Exit
    <b>Characteristic:</b> Company Code
    <b>Variable Represents:</b> Multiple Single Values
    <u><b>This is the used ABAP code:</b></u>
    WHEN 'ZCCD'.
    CLEAR l_s_range.
    l_s_range-low = '2002;2004'.
    l_s_range-sign = 'I'.
    l_s_range-sign = 'EQ'.
    APPEND l_s_range TO e_t_range.
    <u><b>The system returns this message:</b></u>
    Value "2002;2004" is too long for variable ZCCD
    appreciate your help!
    //michael

    Eugene, Marcus
    it works now, thx a lot!
    Please find attached the final code:
    CLEAR l_s_range.
    l_s_range-low = '2002'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR l_s_range.
    l_s_range-low = '2004'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    (Delta to Marcus's code is bold)

  • Reports 9i Graphs with more than one query..

    Hello,
    I am converting my 6i reports to 9i reports. On my graph reports with more than one query, when I invoke the graph wizard it changes the value of the src to the wrong query automatically. When I run my report, I am getting the error REP-0069 Internal Error rwlib-1: REP-6219 Column (Column Name) not in given cursor hierarchy. Although it's a pretty easy fix to go into the graph settings in the property palette and change it back, it is extremely frustrating. Has anyone else ran into this problem and did you find a permanent fix?
    Thanks,
    Laura

    Hi Laura
    One workround would be to create a new query in the Data Model that includes desired fields, and then source
    chart to the new group.
    FYi, bug2527100 was filed on this issue and is already fixed. The fix would be available in 9i Reports 9.0.2.2 patch. Reports 9.0.2.2 patch is scheduled to be released on Mar 05 2003 (tentative date).
    Thanks
    The Oracle Reports Team

  • JSR-75 PIM API creating Contact with more than one Number (Phone,Fax ...)

    Hi everybody
    I try to create a contact with more than one Phonenumber using the method contact.addString(...) .
    Contact with one single number is no Problem but contacts with more than one Number are ignored and are not stored to the phonebook. I try to add the Numbers using a for -loop. Is there an other way to solve this Problem?
    please Help.
    Thank You.

    Wonder if you have made any progress - if so,
    could you share ?

  • Updating JournalEntries object with more than one currency fails

    I'm using SBO 6.50 (exactly CEE version 7.60.014 SP:01 EF:08).
       I'm trying to update memo field of existing journal entries. Most of them works OK, but if I try to update entry with more than one currency, update fails with an error code -5002 and message:
       Transaction includes more than one currency [OCRN].
    Code (in C++) is quite simple:
    SAPbobsCOM::ICompanyPtr m_company = SAPbobsCOM::ICompanyPtr("SAPbobsCOM.Company");
    SAPbobsCOM::IJournalEntriesPtr pEntry = m_company->GetBusinessObject(SAPbobsCOM::oJournalEntries);
    long m_nId = 1;     // TransId field, any valid value
    try
         if (pEntry->GetByKey(m_nId) != -1)
              return;
         pEntry->Memo = _bstr_t("Memo");;
         if (pEntry->Update() < S_OK)
              throw(0);
    catch(...)
         long lError; BSTR bstrError;
         m_company->GetLastError(&lError, &bstrError);
    What's wrong? Using multiple currencies in journal entry is correct, it is possible to add them manually so it should be possible to update such an "safe" field as Memo is.

    Hi,
    I have the same problem, but if you go to Administration->System Initialization ->Document Settings, select "Per Document", and in Document, choose "Journal Entry", by default, the options are clicked, or "Blocked", this is why in DI yoy get this message.
    Try to unchecked and it will work.
    HTH,
    Ribeiro Santos

Maybe you are looking for