Getting problem in query of JDBC !!!!

i've written the following code:
PreparedStatement pstmt=con.prepareStatement("SELECT  * FROM     (SELECT  ROW_NUMBER() OVER (ORDER BY date) AS Row,phone_no,model,cur_version,version,date,download,version_download,count FROM nokia_supported) AS LogWithRowNumbers WHERE  Row >= "+Integer.parseInt(request.getParameter("pr"))+" AND Row <= "+Integer.parseInt(request.getParameter("limitePorPagina"))+"  ");This is for generating the JSP Paging and i got the result also, it is working fine. It is working fine with SQL 2005.
But now , i want to transfer it on the server where SQL 2000 is running.
i'm getting error when i run on the server. Could anyone help me out in this regard. As, ROW_NUMBER() is not recognised in SQL 2000 i.e m getting error . I want to run it on the server, so i want little bit manipulation in my code and also m NOT USING THE PROCEDURE in SQL. So, i don't want the procedure based query.
in advance thanks.........

Dear Navneet Singh,
You got the right output when u ues SQL 2005.
Now, you are willing to change to SQL 2000.
Now you got the pbm ROW_NUMBER().
Can you find the appropriate method in SQL 2000 ??
Regards,
Rengaraj.R

Similar Messages

  • Japanese Data Set and Get Problem with SQL

    Hi,
    I am not able to retrieve or set data contain Japanese characters.
    Formerly our set up was running just fine. But on doing installation on a new machine, things have gone all haywire.
    I installed Win NT 4.0 Japnese version and SQL 7.0 and later Win 2000 Server Japanese version with same SQL 7.0, but on both get and set I get SQL Exceptions:
    Query 1:
    SELECT DISTINCT MAKER_CD FROM T_MAKER WHERE MAKER_NAME = '�a�l�v�A���s�i' Exception:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string '�a�l�v�A��'.
    Query 2:
    Insert into Car (intCarID, nvchCustomerID, nvchCarMaker, nvchCarModel,nvchCarDescription, nvchCarCode, nvchCarColor, tintRegistrationCalendar,tintRegistrationMonth, intRegistrationYear,nvchAnnualMileage, nvchPurpose, intNoOfKms,intAirBag, btEcologicalCar, btAntilockBreakSystem,btAntiskid, btSafetyBody, btAntitheft, btFourWheelDrive,btCarModification, nvchLicensePlateArea, intLicensePlateType,nvchLicensePlateHiragana, tintLicensePlateNumber,nvchCarManufacturingNumber, nvchCarOwner, btCurrentlyInsured)Values( 1, 'NI200205040001','','', '', 'HA11S', '���I����������',2,1, 11 ,'5000', '�����E���W���[',0,2,0,0,0,0,0,0,0,'',0,'null', '0' ,'', '�_�������{�l' , 0)
    Exception:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'null'.
    I do not wish to Prepared Statements. I will need to update all my JDBC calls this way.
    Would be grateful if any solutions to this problem could be provided.
    Tahanks and Regards

    If you are using the JDBC-ODBC bridge, then add the 'charset' property (with the name of the japanese charset as value, or whichever you are using) to the Properties instance you pass on to getConnection().
    Alin.

  • Problem in creating a JDBC System on VC7.1 portal ( CE7.1 SP3)

    I have a problem in creating a JDBC System on VC7.1 portal (CE7.1 SP3)
    I get the following error:
    Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the back-end application using the connector defined in this system object
    Results
    Default alias retrieved successfully
    Connection failed. Make sure user mapping is set correctly and all connection properties are correct.
    Could you please let me know if there are any guides on SAP Library; I was not able to find any documentation nor any threads discussing this on VC7.1
    Although, I saw this thread Can Visual Composer talk to/connect to any Database?..
    which says that VC7.1 can connect to SAP backend
    and web services only, and there is no direct connection to the db.
    Help needed please.

    Hi Dharmi
    Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
    CE7.1.1 will be released at September 2008 for ramp-up customers.
    There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
    The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
    Many layout & modeling improvements
    Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
    Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
    Regards,
       Shai

  • Problem loading Query Designer Add-in

    Hi All,
    Can anyone please help me on my below issue.
    Whenever user is trying to start a new query in Essbase , he is getting below error message. It will not allow user to build a fresh Essbase pull
    Problem loading Query Designer Add-in. Workbook Activate,open & close operations may not be fully propogated
    Thanks in advance.
    Regards
    Vishal

    Hi Vishal,
    1) Try to remove the addin and then add again.(Before doing this close all the excel process from the task Manager)
    2) Check weather essexcln.xll and essxleqd.xla are corrupted.

  • View with columns based on function - problem with query

    Hi,
    I'm using Oracle 9i;
    I've created a view which has columns based on a table columns (multiple columns from 1 table) and funtion (multiple columns based on 1 function).
    The function takes ID as the first argument and name of the column to determine which value to return as the second one.
    Here is a sample of such function (simplified):
    FUNCTION my_function
    (in_id IN NUMBER, in_col_name IN VARCHAR2)
    RETURN VARCHAR2
    IS
    c_name VARCHAR2(100);
    c_last_name VARCHAR2(100);
    BEGIN
    SELECT T.NAME, T.LAST_NAME
    INTO c_name, c_last_name
    FROM TABLE_1 T, TABLE_2 Z
    WHERE T.PK = Z.FK
    AND Z.ID = in_id;
    IF in_col_name = 'NAME' THEN
    RETURN c_name;
    ELSIF in_col_name = 'LAST_NAME' THEN
    RETURN c_last_name;
    END IF;
    END;
    For simplicty I've restricted the number of columns.
    CREATE OR REPLACE VIEW my_view
    (ID, NAME, LAST_NAME)
    AS
    SELECT
    T.ID ID
    ,CAST(my_function(T.ID,'NAME') AS VARCHAR2(100)) NAME
    ,CAST(my_function(T.ID,'LAST_NAME') AS VARCHAR2(100)) LAST_NAME
    FROM TABLE T;
    There is no problem with query:
    SELECT * FROM my_view;
    The problem arises when I query the view (regardles of '=' or 'LIKE'):
    SELECT * FROM my_view
    WHERE name LIKE '%some_part_of_name%'
    The query returns rows for same names, for same it doesn't. If I put '=' and the whole name the query returns nothing, but when I put 'LIKE' and the first letter it returns rows in some cases.
    I've tried to debug this situation and I've discovered that the function recives ID not in the proper order and not the same amount of times - in explicit:
    for each ID in (1, 2, 3, 4, 5, 6, ... , 100) the function should be called twice for each ID and in the same order, but it does not.
    I get 1, 1, 2, 3, 3, 6, 20, 20 and so on.
    Help needed.
    Greetings.

    The problem is more complicated than the solutions provided here.
    The reason why I'm using the function is this:
    the original view was constructed using multiple union all selects and the speed was terrible. I've created the index on the base table to obtain a proper sort. For retriving all records at once the view works perfectly, but if one wants to query by columns based on function the results are suprisng - sometimes there are, some times there are none, or if you serch with "like" and only a part of string there are results, but with "=" there are no results.
    Here are real DDLs:
    View:
    CREATE OR REPLACE VIEW V_DOK_ARCH
    (ID_ZDAR, TYP, STAN, DATE_CREATED, CREATED_BY,
    DATE_MODIFIED, MODIFIED_BY, SPRA_ID_SPRA, PODM_ID_PODM, PODM_UMOW_ID_UMOW,
    NR_WFS, WFS_NR_INTER, UWAGI_OPER, FUNDUSZ, NUMER,
    DATA_PODPISANIA, RODZAJ, TYP_PRZY, TYP_UBEZ, NAZWISKO,
    IMIE, IMIE_OJCA, NAZWA_FIRMY, NAZWA_FIRMY_SKR, DANE_KLIE)
    AS
    SELECT /*+ INDEX(Z ZDAR_DATE_CREATED_DESC_I) */
    Z.ID_ZDAR ID_ZDAR
    , Z.TYP TYP
    , Z.STAN STAN
    , Z.DATE_CREATED DATE_CREATED
    , Z.CREATED_BY CREATED_BY
    , Z.DATE_MODIFIED DATE_MODIFIED
    , Z.MODIFIED_BY MODIFIED_BY
    , Z.SPRA_ID_SPRA SPRA_ID_SPRA
    , Z.PODM_ID_PODM PODM_ID_PODM
    , Z.PODM_UMOW_ID_UMOW PODM_UMOW_ID_UMOW
    , Z.NR_WFS NR_WFS
    , Z.WFS_NR_INTER WFS_NR_INTER
    , Z.UWAGI_OPER UWAGI_OPER
    , Z.FUNDUSZ FUNDUSZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NUMER') AS VARCHAR2(30)) NUMER
    , F_Rej_Zdar_Date(Z.ID_ZDAR, 'DATA_PODPISANIA') DATA_PODPISANIA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'RODZAJ') AS VARCHAR2(4)) RODZAJ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_PRZY') AS VARCHAR2(4)) TYP_PRZY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_UBEZ') AS VARCHAR2(3)) TYP_UBEZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO') AS VARCHAR2(30)) NAZWISKO
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE') AS VARCHAR2(30)) IMIE
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA') AS VARCHAR2(30)) IMIE_OJCA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY') AS VARCHAR2(300)) NAZWA_FIRMY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR') AS VARCHAR2(100)) NAZWA_FIRMY_SKR
    , CAST(LTRIM(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA')||F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY')||DECODE(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY'),NULL,F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR'),NULL)) AS VARCHAR2(492)) DANE_KLIE
    FROM T_ZDARZENIA Z
    WHERE F_Rej_Zdar_Char(Z.ID_ZDAR, 'JEST') = 'T';
    and functions:
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Char
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN VARCHAR2
    IS
    c_numer           T_PRZYSTAPIENIA.NUMER%TYPE;--VARCHAR2(30);
    c_rodzaj           T_KLIENCI.RODZAJ%TYPE;--VARCHAR2(1);
    c_typ_przy           T_PRZYSTAPIENIA.TYP_PRZY%TYPE;--VARCHAR2(1);
    c_typ_ubez           T_PRZYSTAPIENIA.TYP_UBEZ%TYPE;--VARCHAR2(3);
    c_nazwisko           T_KLIENCI.NAZWISKO%TYPE;--VARCHAR2(30);
    c_imie                T_KLIENCI.IMIE%TYPE;--VARCHAR2(30);
    c_imie_ojca      T_KLIENCI.IMIE_OJCA%TYPE;--VARCHAR2(30);
    c_nazwa_firmy      T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(300);
    c_nazwa_firmy_skr T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(100);
    c_jest                VARCHAR2(1) := 'T';
    c EXCEPTION;
    BEGIN
    --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR);
    BEGIN
    SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
    INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
         INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, I.nazwisko, I.imie, I.imie_ojca, I.NAZWA NAZWA_FIRMY, I.NAZWA_SKR nazwa_firmy_skr
              INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                   INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                        INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                             INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                                  INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.NUMER_UMOWY NUMER, DECODE(k.TYP_PRZYSTAPIENIA,'P','F','P') RODZAJ,k.TYP_PRZYSTAPIENIA TYP_PRZY,'NPO' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, k.nazwa_firmy nazwa_firmy, k.nazwa_firmy_skr nazwa_firmy_skr
                                       INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.NUMER_UMOWY NUMER, 'F' RODZAJ,'-' TYP_PRZY,'OPS' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                            INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, NULL nazwisko, NULL imie_pierwsze, NULL imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                                 INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR||' ostatni wyjatek');
                                                           NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    --raise c;
    IF WE_KOLUMNA = 'NUMER' THEN
    RETURN c_numer;
    ELSIF WE_KOLUMNA = 'RODZAJ' THEN
    RETURN c_rodzaj;
    ELSIF WE_KOLUMNA = 'TYP_PRZY' THEN
    RETURN c_typ_przy;
    ELSIF WE_KOLUMNA = 'TYP_UBEZ' THEN
    RETURN c_typ_ubez;
    ELSIF WE_KOLUMNA = 'NAZWISKO' THEN
    RETURN c_nazwisko;
    ELSIF WE_KOLUMNA = 'IMIE' THEN
    RETURN c_imie;
    ELSIF WE_KOLUMNA = 'IMIE_OJCA' THEN
    RETURN c_imie_ojca;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY' THEN
    RETURN c_nazwa_firmy;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY_SKR' THEN
    RETURN c_nazwa_firmy_skr;
    ELSIF WE_KOLUMNA = 'JEST' THEN
    RETURN c_jest;
    END IF;
    END;
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Date
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN DATE
    IS
    d_data DATE;
    BEGIN
    BEGIN
    SELECT p.DATA_PODPISANIA
    INTO d_data
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.DATA_PODPISANIA
         INTO d_data
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL DATA_PODPISANIA
              INTO d_data
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                   INTO d_data
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                        INTO d_data
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                             INTO d_data
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                                  INTO d_data
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                       INTO d_data
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                            INTO d_data
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL DATA_PODPISANIA
                                                 INTO d_data
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           d_data := NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    IF WE_KOLUMNA = 'DATA_PODPISANIA' THEN
    RETURN d_data;
    END IF;
    END;

  • Entire JDBC communication stopped if problem with one single JDBC interface

    Hello,
    Will the entire JDBC communication stopped if problem with one single JDBC interface?
    Thanks,
    Soorya.

    hi surya,
    this will happend if u use maintain order at runtime at interface determination.
    just uncheck this option if u dont neet EOIO.
    if you are getting the problem if u r going for EO then the problem might be using same JDBC channel for all interfaces.
    if each interface is expected with a high load then it better to go for dedicated channels for interfaces.
    like INTERFACE A should use JDBC A channel and INTERFACE B should use JDBC B channel.
    Thanks & Regards,
    Rama krishna

  • Problem when querying OLAP for Value based hierarchy

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

  • Drag & relate problem in Query Iview

    Hi,
    I just trying the weblog
    1-2-3 Drag&Relate (or D&R for dummies)
    So all the steps mentioned in that i have followed properly but in Content Admin --> unification under Business Objects i do get sales and stores and i define them according to weblog as source and destination but under edit mode Relation Type is Empty which i think should be manual or something and all the other things are same as shown is screen-shot of the weblog and also in the enduser screen i get message
    <b>Query execution failed. Exception message: Error trying to execute a query statement against MetaMatrix: Error trying to establish connection to the EIS : null</b>
    So i have no clue what could be possible problem
    Kindly Help
    Regards,
    Ricky

    Hi shivasankaran ,
    we also face this problem some times. at this particular issue...
    we should make report 4r month  wise only y because our excel sheet contains 65000 lines limit if ur drilling down more fields
    from free characterisitc. it cant display.
    IF ur case is mandetory to drag 2moths r 3months. just try to reduce drill down fields (r) if this also mandetory, use 2010 microsoft sheet 4r reporting this can use up to 1lac line.
    if this also not working. just do this, let me give one example if we r drilling down material & customers 4r   3-4months. one customer can buy N number of material so it will eceeds. just see wht ur  drilling down first material (r) customer. if first material & customer this is not working, drill customer & material.
    think this will help, any way let me know wht happen.
    Regard's
    venky

  • Help me to reduce buffer gets of following query

    Buffer gets with this query is 460K.
    We want to reduce it drastically.
    SELECT temp21.resource_code
    ,temp21.employee_type employee_type
         ,temp21.resource_name resource_name
         ,temp21.manager_id
         ,temp21.manager_name
         ,temp21.period_start
         ,temp21.period_finish
         ,temp21.avail_hours
         ,temp21.act_hours
         ,temp21.timesheet_status timesheet_status
         ,temp21.email,temp21.ouc
         ,temp21.work_country
         ,f.level1_unit_id level1_id
         ,f.level2_unit_id level2_id
         ,f.level3_unit_id level3_id
         ,f.level4_unit_id level4_id
         ,f.level5_unit_id level5_id
         ,f.level6_unit_id level6_id
         ,f.level7_unit_id level7_id
         ,f.level8_unit_id level8_id
         ,f.level9_unit_id level9_id
         ,f.level10_unit_id level10_id
         ,f.level1_name
         ,f.level2_name
         ,f.level3_name
         ,f.level4_name
         ,f.level5_name
         ,f.level6_name
         ,f.level7_name
         ,f.level8_name
         ,f.level9_name
         ,f.level10_name
    FROM (SELECT avail.res_id
         ,avail.resource_code
              ,avail.employee_type
                        ,avail.person_type
                        ,avail.resource_name
                        ,avail.manager_id
                        ,avail.manager_name
                        ,avail.period_start
                        ,avail.period_finish
                        ,avail.avail_hours
                        ,NVL(act.act_hours,0) act_hours
                        ,act.timesheet_status
                        ,avail.prid
                        ,avail.email
                        ,avail.ouc
                        ,avail.work_country
    FROM (SELECT /*+ALL_ROWS*/r.id res_id
         ,lk.name employee_type
              ,r.unique_name resource_code
                                            ,r.person_type
                                            ,r.first_name||' '||r.last_name resource_name
                                            ,r.manager_id manager_id
                                            ,r1.first_name||' '||r1.last_name manager_name
                                            ,TRUNC(tp.prstart) period_start
                                            ,TRUNC(tp.prfinish - 1) period_finish
                                            ,NVL(o.gs_hrs_avail_week,0) avail_hours
                                            ,r.email
                                            ,o.ouc
                                            ,o.work_country
                                            ,tp.prid
                   FROM niku.ODF_CA_RESOURCE o
                   ,niku.SRM_RESOURCES r
                        ,niku.SRM_RESOURCES r1
                        ,niku.PRTIMEPERIOD tp
                        ,niku.CMN_SEC_USER_GROUPS usr_grp
                        ,niku.CMN_SEC_GROUPS grp
                        ,(SELECT
                             NLS.NAME
                             ,LKP.ID
                             FROM CMN_CAPTIONS_NLS NLS,CMN_LOOKUPS LKP
                             WHERE NLS.PK_ID=LKP.ID
                             AND LKP.LOOKUP_TYPE='SRM_RESOURCE_TYPE'
                             AND NLS.TABLE_NAME='CMN_LOOKUPS'
                             AND NLS.LANGUAGE_CODE='en') lk
    WHERE r.id=o.id
    AND r1.user_id(+)=r.manager_id
    AND r.user_id=usr_grp.user_id
    AND usr_grp.GROUP_ID=grp.id
         AND r.person_type=lk.id
    AND r.is_active = 1
    AND r1.is_active = 1
    AND grp.GROUP_CODE='gs_tb'
    AND tp.prisopen = 1
    ) avail
                   ,(SELECT r.id
                   ,tp.prid
                                            ,SUM(NVL(practsum,0)/3600) act_hours
                                            ,ts.prstatus timesheet_status
    FROM niku.SRM_RESOURCES r
                   ,niku.PRTIMESHEET ts
    SELECT /*+ALL_ROWS*/ MAX(prid) prid
                             ,prtimeperiodid
                             ,prresourceid
    FROM niku.prtimesheet
                             GROUP BY prtimeperiodid,prresourceid
    ) ts_new
                        ,niku.PRTIMEENTRY te
                        ,niku.PRTIMEPERIOD tp
                        ,niku.CMN_SEC_USER_GROUPS usr_grp
                        ,niku.CMN_SEC_GROUPS grp
    WHERE ts.prid=ts_new.prid
    AND ts.prtimeperiodid=ts_new.prtimeperiodid
    AND ts.prresourceid=ts_new.prresourceid
    AND r.id=ts.PRRESOURCEID
    AND ts.PRID=te.PRTIMESHEETID
    AND ts.PRTIMEPERIODID=tp.prid
    AND usr_grp.USER_ID=r.USER_ID
    AND grp.id=usr_grp.group_id
    AND r.is_active=1
    AND tp.PRISOPEN=1
    AND ts.prstatus not in(0,2,5)
    AND grp.group_code='gs_tb'
    AND TRUNC(tp.PRSTART) >= TRUNC(TO_DATE('7/24/2006','MM/DD/YYYY HH:MI:SS AM'))
    AND TRUNC(tp.PRFINISH-1) <= TRUNC(TO_DATE('9/25/2006','MM/DD/YYYY HH:MI:SS AM'))
              GROUP BY r.ID
                   ,tp.PRID
                             ,ts.prstatus) act
    WHERE act.id(+) = avail.res_id
    AND act.prid(+) = avail.prid
    AND (avail.avail_hours - NVL(act.act_hours,0) > 0))temp21
         ,prj_obs_associations o1
         ,nbi_dim_obs f
         WHERE 1=1
    AND temp21.prid in (SELECT prid
    FROM PRTIMEPERIOD
    WHERE TRUNC(PRSTART) >= TRUNC(TO_DATE('7/24/2006','MM/DD/YYYY HH:MI:SS AM'))
    AND TRUNC(PRFINISH-1) <= TRUNC(TO_DATE('9/25/2006','MM/DD/YYYY HH:MI:SS AM'))
    AND
    temp21.res_id = o1.record_id
    AND o1.unit_id = f.obs_unit_id
    AND o1.table_name = 'SRM_RESOURCES'
    AND f.obs_type_id = 5000009
    AND f.level5_unit_id = 5013334
                                       ORDER BY temp21.manager_name
                                       ,temp21.manager_id
                                       ,temp21.resource_name
                                       ,temp21.resource_code
                                       ,temp21.period_start
                                       ,temp21.period_finish
                                       ,temp21.timesheet_status

    ...Also
    AND TRUNC(tp.PRSTART) >= TRUNC(TO_DATE('7/24/2006','MM/DD/YYYY HH:MI:SS AM'))
    AND TRUNC(tp.PRFINISH-1) <= TRUNC(TO_DATE('9/25/2006','MM/DD/YYYY HH:MI:SS AM'))Although this won't fail, you have specified the time portion of the date without supplying data to be converted....which you don't need as it will automatically be set to midnight if you don't specify it.
    In addition, you are applying the TRUNC function to the column you are comparing which will prevent any indexes from being used. You should perform the arithmetic on the litterals, not the columns, and set up the range correctly:
    AND tp.PRSTART >= TO_DATE('7/24/2006','MM/DD/YYYY)
    AND tp.PRFINISH < TO_DATE('9/25/2006','MM/DD/YYYY) + 2This should yeild the same result and will allow any indexes to be used.
    Without a formatted execution plan and more info from you, this is just a wild guess as to what part of the problem might be.
    HTH
    David
    After a further look, the cartesian product appears to be in the bold section:
    SELECT
         temp21.resource_code
         ,temp21.employee_type employee_type
         ,temp21.resource_name resource_name
         ,temp21.manager_id
         ,temp21.manager_name
         ,temp21.period_start
         ,temp21.period_finish
         ,temp21.avail_hours
         ,temp21.act_hours
         ,temp21.timesheet_status timesheet_status
         ,temp21.email,temp21.ouc
         ,temp21.work_country
         ,f.level1_unit_id level1_id
         ,f.level2_unit_id level2_id
         ,f.level3_unit_id level3_id
         ,f.level4_unit_id level4_id
         ,f.level5_unit_id level5_id
         ,f.level6_unit_id level6_id
         ,f.level7_unit_id level7_id
         ,f.level8_unit_id level8_id
         ,f.level9_unit_id level9_id
         ,f.level10_unit_id level10_id
         ,f.level1_name
         ,f.level2_name
         ,f.level3_name
         ,f.level4_name
         ,f.level5_name
         ,f.level6_name
         ,f.level7_name
         ,f.level8_name
         ,f.level9_name
         ,f.level10_name
    FROM (     SELECT
                   avail.res_id
                   ,avail.resource_code
                   ,avail.employee_type
                   ,avail.person_type
                   ,avail.resource_name
                   ,avail.manager_id
                   ,avail.manager_name
                   ,avail.period_start
                   ,avail.period_finish
                   ,avail.avail_hours
                   ,NVL(act.act_hours,0) act_hours
                   ,act.timesheet_status
                   ,avail.prid
                   ,avail.email
                   ,avail.ouc
                   ,avail.work_country
              FROM (     SELECT /*+ALL_ROWS*/
                             r.id res_id
                             ,lk.name employee_type
                             ,r.unique_name resource_code
                             ,r.person_type
                             ,r.first_name||' '||r.last_name resource_name
                             ,r.manager_id manager_id
                             ,r1.first_name||' '||r1.last_name manager_name
                             ,TRUNC(tp.prstart) period_start
                             ,TRUNC(tp.prfinish - 1) period_finish
                             ,NVL(o.gs_hrs_avail_week,0) avail_hours
                             ,r.email
                             ,o.ouc
                             ,o.work_country
                             ,tp.prid
                        FROM
                             niku.ODF_CA_RESOURCE o
                             ,niku.SRM_RESOURCES r
                             ,niku.SRM_RESOURCES r1
                             ,niku.PRTIMEPERIOD tp
                             ,niku.CMN_SEC_USER_GROUPS usr_grp
                             ,niku.CMN_SEC_GROUPS grp
                             ,(     SELECT
                                       NLS.NAME
                                       ,LKP.ID
                                  FROM
                                       CMN_CAPTIONS_NLS NLS,
                                       CMN_LOOKUPS LKP
                                  WHERE
                                       NLS.PK_ID=LKP.ID
                                  AND LKP.LOOKUP_TYPE='SRM_RESOURCE_TYPE'
                                  AND NLS.TABLE_NAME='CMN_LOOKUPS'
                                  AND NLS.LANGUAGE_CODE='en'
                             ) lk
                        WHERE r.id=o.id
                        AND r1.user_id(+)=r.manager_id
                        AND r.user_id=usr_grp.user_id
                        AND usr_grp.GROUP_ID=grp.id
                        AND r.person_type=lk.id
                        AND r.is_active = 1
                        AND r1.is_active = 1
                        AND grp.GROUP_CODE='gs_tb'
                        AND tp.prisopen = 1
                   ) avail
                   ,(     SELECT
                             r.id
                             ,tp.prid
                             ,SUM(NVL(practsum,0)/3600) act_hours
                             ,ts.prstatus timesheet_status
                        FROM
                             niku.SRM_RESOURCES r
                             ,niku.PRTIMESHEET ts
                             ,(      SELECT /*+ALL_ROWS*/
                                       MAX(prid) prid
                                       ,prtimeperiodid
                                       ,prresourceid
                                  FROM
                                       niku.prtimesheet
                                  GROUP BY
                                       prtimeperiodid,
                                       prresourceid
                             ) ts_new
                             ,niku.PRTIMEENTRY te
                             ,niku.PRTIMEPERIOD tp
                             ,niku.CMN_SEC_USER_GROUPS usr_grp
                             ,niku.CMN_SEC_GROUPS grp
                        WHERE
                             ts.prid=ts_new.prid
                        AND ts.prtimeperiodid=ts_new.prtimeperiodid
                        AND ts.prresourceid=ts_new.prresourceid
                        AND r.id=ts.PRRESOURCEID
                        AND ts.PRID=te.PRTIMESHEETID
                        AND ts.PRTIMEPERIODID=tp.prid
                        AND usr_grp.USER_ID=r.USER_ID
                        AND grp.id=usr_grp.group_id
                        AND r.is_active=1
                        AND tp.PRISOPEN=1
                        AND ts.prstatus not in(0,2,5)
                        AND grp.group_code='gs_tb'
                        AND TRUNC(tp.PRSTART) >= TRUNC(TO_DATE('7/24/2006','MM/DD/YYYY HH:MI:SS AM'))
                        AND TRUNC(tp.PRFINISH-1) <= TRUNC(TO_DATE('9/25/2006','MM/DD/YYYY HH:MI:SS AM'))
                        GROUP BY r.ID
                        ,tp.PRID
                             ,ts.prstatus
                   ) act
              WHERE act.id(+) = avail.res_id
              AND act.prid(+) = avail.prid
              AND (avail.avail_hours - NVL(act.act_hours,0) > 0)
         )temp21
         ,prj_obs_associations o1
         ,nbi_dim_obs f
    WHERE 1=1
         AND temp21.prid in (     SELECT prid
                                       FROM PRTIMEPERIOD
                                       WHERE TRUNC(PRSTART) >= TRUNC(TO_DATE('7/24/2006','MM/DD/YYYY HH:MI:SS AM'))
                                       AND TRUNC(PRFINISH-1) <= TRUNC(TO_DATE('9/25/2006','MM/DD/YYYY HH:MI:SS AM'))
    AND
         temp21.res_id = o1.record_id
         AND o1.unit_id = f.obs_unit_id
         AND o1.table_name = 'SRM_RESOURCES'
         AND f.obs_type_id = 5000009
         AND f.level5_unit_id = 5013334
    ORDER BY temp21.manager_name
    ,temp21.manager_id
    ,temp21.resource_name
    ,temp21.resource_code
    ,temp21.period_start
    ,temp21.period_finish
    ,temp21.timesheet_status Message was edited by:
    david_tyler

  • Program to get all the query elements with UIDs with EN texts of a BW query

    Hi All,
    Need a program to get all the query elements with UIDs with EN and Other language texts, of a BW query.
    We are doing a global implementation.
    We are implementing Translations in French.
    We need to see, the list of all UID's of a query, their EN texts and the FR texts.
    Tried a bit, we are having the problem in getting the UIDs of the structure elements.
    Thanks in advance,
    Best Regards,
    - Shashi

    Hi ,
    Below is the list of important tables related to query.
    RSZELTDIR Directory of the reporting component elements
    RSZELTTXT Texts of reporting component elements
    RSZELTXREF Directory of query element references
    RSRREPDIR Directory of all reports (Query GENUNIID)
    RSZCOMPDIR Directory of reporting components
    RSZRANGE Selection specification for an element
    RSZSELECT Selection properties of an element
    RSZELTDIR Directory of the reporting component elements
    RSZCOMPIC Assignment reuseable component <-> InfoCube
    RSZELTPRIO Priorities with element collisions
    RSZELTPROP Element properties (settings)
    RSZELTATTR Attribute selection per dimension element
    RSZCALC Definition of a formula element
    RSZCEL Query Designer: Directory of Cells
    RSZGLOBV Global Variables in Reporting
    RSZCHANGES Change history of reporting components
    Hope this will help you...
    Thanks,
    Jitendra

  • Handling any query using JDBC ?

    Hi there,
    I was wondering if their actually exist a way of handling/processing any SELECT statement a user would enter.
    ex: the user enter SELECT * FROM SCOTT.EMP;
    Is it possible to retrieve using JDBC teh metadata associated with "*" ?
    any help would be welcome.
    Regards
    Eric.

    When you get back the result of a query in JDBC you get a ResultSet object.
    Off of that you can obtain a ResultSetMetaData object which fully describes the result set - column names, types, scale and precision, etc. You can use that for dynamic processing of your result set, for example if you wanted to display it in a table.

  • Is there a way get the actual query that was excecuted

    I have a large query with lots of <cfqueryparam 's
    Is there a way get the actual query that was excecuted so I can debug it/ find out what the problem is, no sql error just logic error

    Personally, I think the easiest way is to use the powerhouse combo of Firebug and ColdFire. (Sorry if you already know this) Firebug is a plugin for Firefox for debugging (great JavaScript debugger in it!). ColdFire is a ColdFusion debugger that hooks into Firebug.
    Firebug: https://addons.mozilla.org/en-US/firefox/addon/1843
    ColdFire: http://coldfire.riaforge.org/
    There are a couple of steps to installing ColdFire on your server (in addition to the Firefox plugin) but it's just a matter of copying a CFM file into a particular folder on your server's CF install. Then you just select ColdFire as the debugging output option in the CF Administrator and you're good to go (the ColdFire zip archive has an install doc).
    Once you're using it, ColdFire lets you see all your queries: the actual SQL, the execution time, whether or not it's cached, etc.
    While there are other techniques for seeing your SQL, I've always found ColdFire to be the easiest to use.

  • Firefox gets problems when 2,7 GB of memory is used by Firefox

    Firefox gets problems when 2,7 GB of memory is used by Firefox. Or more. Like 2,8 GB.
    It started when I read jpost.com with tens of tabs open. I don't remember how many. But I know there was more than 40.
    On the tab I that I was reading, the page turned completely black. Pitch black with nothing else, not even the Firefox interface. It was actually a pitch black shape that looked like a web page in shape. The blackness quickly disappeared and the page was normally readable again. But then it happened again - the page turned black again.
    The same page turns black happened again later.
    One of my browsing sessions had Firefox slow down so much that you could see scrolling happening when I used scrolling.
    Still another time I had 60 tabs open and Firefox worked completely fine without freezes, slowdowns, or black shapes. I could close Firefox by just pressing the red X in the title bar.
    Yesterday, I had 50 tabs open and I experienced a slowdown when I looked at the Breaking News headlines. The headlines would show slower than usual. The Breaking News headlines at jpost.com show the headlines a few words at a time until the headline is completely shown. Then the headline disappears and the next starts showing a few words at a time. And speed in general was not what you normally have with a computer that has 8 GB of memory. And a Core i5 processor. I opened two more tabs from the Breaking News section I had opened. After I opened a new window, Firefox froze. I had to close Firefox from the Task Manager by pressing End process. I had used Firefox for 6 hours without ever closing any of the tabs I had opened.
    In all of these cases, more than 40 tabs were open. In all of these cases, the slow down or freeze meant I had to use Task Manager and then press End process on the Processes tab. In all cases except the two I describe in the next paragraph, I never close any tabs after opening them. No problems have ever happened until Firefox started using 2,7 GB of memory. Until that point, everything is normal with no freezes or slowdowns.
    At two times, I tried to reduce memory usage by closing tabs. However, in both cases this would make Firefox freeze. In one of these cases, Firefox would show something bizarre: there would be about 7 tabs, and one of the tabs would be partly shown. Also, Firefox would show the busy cursor. Firefox did not show how many tabs I actually had. The second time, I tried to close the tabs by clicking Close other tabs in the menu that you get when right-click a tab. The tabs would close fine, but I remember that I opened Gmail and then I did this: I clicked on the Promotions tab. Instead of seeing the tab with the Emails, Firefox showed a busy cursor and the title bar said not responding. Firefox froze.
    The reason might be Adblock Plus memory usage. In Adblock Plus home page, developer Wladimir Palant writes in his blog about how Adblock Plus uses a lot of memory: https://adblockplus.org/blog/on-the-adblock-plus-memory-consumption .

    One more bit of information: I have a Geforce 640 GT graphics card. My graphics card drivers are old- version 311.41. The newest version of the drivers is 340.52. Would a new graphics card driver solve the problem?

  • Data not getting displayed in query

    Hi
    I have master infoobject with keyfigure units as percentage, and data is loaded and working fine.
    data is not getting displayed in query, i am getting the error message, that exception aggregation has to be maintained for 0calday.
    how do i resolve the issue
    Regards

    solved

  • How to get physical SQL query

    Hi All,
    How to get the physical SQL query for the OBIEE reports.
    Thanks in advance,
    Haree.

    Hi Anitha,
    Thanks for your reply,
    I am getting XML script in log file. (Settings > Administration > Manage Sessions > View Log).
    How to get physical SQL query ?
    Thanks,
    Haree

Maybe you are looking for

  • Using Fault Message Type in BPM

    Hi, In my BPM Scenario, I am using a synchronous send step in which I am using a fault message type.For giving the container for the fault message in the Properties area of the send step, I want to define a container corresponding to the Fault messag

  • Stereo sound from all speake

    Hii, I have a X-Fi Xtreme music and a 5. speaker setup, can someone tell me how can I get stereo sound from all of my speakers? thanks in advance.

  • HT2589 How to set a password before buying an app

    How to set a password before buying an app

  • Character override in Table of Contents and Index

    Am using a Stone Sans Open Type phonetic font for several characters in headings and in index markers. When Table of Contents or Index generates, the phonetic characters are not displaying in the override font. All characters display in the base font

  • Rank as an Aggregate function

    Can anyone explain to me how RANK function worked in ORACLE ? For instance I have a table as below ID JobID Salary 100 667 800 200 670 1250 300 670 1250 400 670 1600 500 671 2200 600 671 2750 700 671 2850 I executed SQL statement 'select rank(1250, 6