Why select query is not running on 10.2.0.2.0  but running on 10.2.0.1.0

Hi Friends,
The below given select statement is executing successfully in version
select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
"CORE     10.2.0.1.0     Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
but NOT in version
select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
"CORE     10.2.0.2.0     Production"
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
the error message is :
ORA-00904:"SSRP"."RESOURCE_ID" invalid identifier
Error at Line 12 : Column 40
SELECT SR.RESOURCE_NAME,
SRG.RESOURCE_GROUP_NAME,
MAX(NVL((SELECT NVL(CHECKED, UNCHECKED)
FROM
(SELECT 2 AS UNCHECKED,
(SELECT 1
FROM S_USAGE_RESOURCE_PERMISSIONS SURP
WHERE SURP.USAGE_PROFILE_ID = 1
AND SURP.RESOURCE_PERMISSION_ID = SRP.RESOURCE_PERMISSION_ID) AS CHECKED
FROM S_RESOURCE_PERMISSIONS SRP
WHERE SRP.RESOURCE_PERMISSION_ID = SSRP.RESOURCE_PERMISSION_ID
AND SRP.RESOURCE_ID = SSRP.RESOURCE_ID
AND SRP.RESOURCE_PERMISSION_VAL = 4 )),0)) AS ALL_PERMISSION
FROM
S_RESOURCE_PERMISSIONS SSRP
INNER JOIN
S_RESOURCE SR ON SR.RESOURCE_ID = SSRP.RESOURCE_ID
INNER JOIN
S_RESOURCE_GROUP SRG ON SRG.RESOURCE_GROUP_ID = SR.RESOURCE_GROUP_ID
GROUP BY SR.RESOURCE_NAME, SRG.RESOURCE_GROUP_NAME;
Given SCHEMA is similar in all respects at both the databases.
can someone suggest me what could be the problem?

Sorry, didn't look close enough, here a corrected query you can try to run.
If you still have problems, try to post a ddl scripts and small sample of data - this may do it easier for other to help you. When you post sql scripts, try as well to enclose them between [ pre ] [ pre ] or [ code ] [ code ] tags to increase readability.
WITH t AS (
SELECT NVL(CHECKED, UNCHECKED) NVL_CHECKED,
       RESOURCE_ID,
       RESOURCE_PERMISSION_ID
  FROM (SELECT 2 AS UNCHECKED,
               (SELECT 1
                  FROM S_USAGE_RESOURCE_PERMISSIONS SURP
                 WHERE SURP.USAGE_PROFILE_ID = 1
                   AND SURP.RESOURCE_PERMISSION_ID =
                       SRP.RESOURCE_PERMISSION_ID) AS CHECKED,
               SRP.RESOURCE_ID,RESOURCE_PERMISSION_ID
          FROM S_RESOURCE_PERMISSIONS SRP
         WHERE SRP.RESOURCE_PERMISSION_VAL = 4))
SELECT SR.RESOURCE_NAME,
       SRG.RESOURCE_GROUP_NAME,
       MAX(NVL_CHECKED) AS ALL_PERMISSION
  FROM S_RESOURCE_PERMISSIONS SSRP INNER_JOIN T ON (T.RESOURCE_ID =
                                                   SSRP.RESOURCE_ID AND
                                                   T.RESOURCE_PERMISSION_ID =
                                                   SSRP.RESOURCE_PERMISSION_ID)
INNER JOIN S_RESOURCE SR ON SR.RESOURCE_ID = SSRP.RESOURCE_ID
INNER JOIN S_RESOURCE_GROUP SRG ON SRG.RESOURCE_GROUP_ID =
                                    SR.RESOURCE_GROUP_ID
GROUP BY SR.RESOURCE_NAME, SRG.RESOURCE_GROUP_NAME;Best regards
Maxim

Similar Messages

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

  • FOR ALL ENTRIES stmnt. in SELECT query is not running properly

    Hello experts,
              In my report program, I write one query on table BSIS.
             Internal table declaration -             
           DATA : BEGIN OF DLC_BSIS OCCURS 0,
                            BUKRS LIKE BSIS-BUKRS,
                            GJAHR LIKE BSIS-GJAHR,
                            BELNR LIKE BSIS-BELNR,  
                            SHKZG LIKE BSIS-SHKZG,
                            BSCHL LIKE BSIS-BSCHL,
                            AUFNR LIKE BSIS-AUFNR,
                            HKONT LIKE BSIS-HKONT,
                            QSSKZ LIKE BSIS-QSSKZ,
                            DMBTR LIKE BSIS-DMBTR,
                       END OF DLC_BSIS.                                                                               
    Query as follows --
             SELECT BUKRS
                           GJAHR
                           BELNR
                           AHKZG
                           BSCHL
                           AUFNR
                           HKONT
                           QSSKZ
                            DMBTR FROM BSIS
                                      INTO TABLE DLC_BSIS
                                     FOR ALL ENTRIES IN IT_BKPF2
                                     WHERE BELNR = IT_BKPF2-BELNR
                                                  AND BUKRS = IT_BKPF2-BUKRS
                                                  AND GJAHR = IT_BKPF2-GJAHR.
    IT_BKPF2 internal table having -- BUKRS - LT01
                                                         BELNR - 6400000061
                                                         GJAHR - 2009.
    And in BSIS database  table  -- 3 entries are there for the above documnet.
    But, in my internal only one entry has come for the same above document.
    I think For all entries stmnt. is not running properly. But Why it's not running properly.??
    What would be the reason..??
    Thanks in advance....!!
    Regards,
    Poonam.

    >
    Poonam Patil wrote:
    > Hello experts,
    >           In my report program, I write one query on table BSIS.
    >
    >          Internal table declaration -             
    >                                            
    >        DATA : BEGIN OF DLC_BSIS OCCURS 0,
    >                         BUKRS LIKE BSIS-BUKRS,
    >                         GJAHR LIKE BSIS-GJAHR,
    >                         BELNR LIKE BSIS-BELNR,  
    >                         SHKZG LIKE BSIS-SHKZG,
    >                         BSCHL LIKE BSIS-BSCHL,
    >                         AUFNR LIKE BSIS-AUFNR,
    >                         HKONT LIKE BSIS-HKONT,
    >                         QSSKZ LIKE BSIS-QSSKZ,
    >                         DMBTR LIKE BSIS-DMBTR,
    >                    END OF DLC_BSIS.                                                                               
    >                           
    >          Query as follows --
    >
    >          SELECT BUKRS
    >                        GJAHR
    >                        BELNR
    >                        AHKZG
    >                        BSCHL
    >                        AUFNR
    >                        HKONT
    >                        QSSKZ
    >                         DMBTR FROM BSIS
    >                                   INTO TABLE DLC_BSIS
    >                                  FOR ALL ENTRIES IN IT_BKPF2
    >                                  WHERE BELNR = IT_BKPF2-BELNR
    >                                               AND BUKRS = IT_BKPF2-BUKRS
    >                                               AND GJAHR = IT_BKPF2-GJAHR.
    >
    > IT_BKPF2 internal table having -- BUKRS - LT01
    >                                                      BELNR - 6400000061
    >                                                      GJAHR - 2009.
    >
    > And in BSIS database  table  -- 3 entries are there for the above documnet.
    >
    > But, in my internal only one entry has come for the same above document.
    >
    > I think For all entries stmnt. is not running properly. But Why it's not running properly.??
    > What would be the reason..??
    >
    >
    > Thanks in advance....!!
    >
    > Regards,
    > Poonam.
    include the buzei field in selection criteria i have faced the same situation earlier.
    always select all the key fields.
    varun

  • Select query is not working in BDC Program

    Hi,
    I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
    i am using two internal table : I_DATA and ITAB
    Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
    So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that  Material Number then  material no. exit in Mara Table.
    Note : at run time  I_DATA have 1 row but ITAB have 0 row ....
    DATA: BEGIN OF I_DATA OCCURS 0,
    MATNR TYPE MARA-MATNR,
    WERKS TYPE MARC-WERKS,
    BWTAR TYPE RMMG1-BWTAR,
    VERPR TYPE BMMH1-VERPR,
    BKLAS TYPE MBEW-BKLAS,
    STATUS TYPE C,
    END OF I_DATA.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF ITAB.
    Loop at I_DATA.
    select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
    endloop.
    Guide me..........

    If you use your
    Loop at I_DATA.
      select matnr mtart from mara into table itab
        where matnr = I_DATA-matnr.
    endloop.
    At end of loop, itab will only contain the result of the last select, so use a
    Loop at I_DATA.
      select matnr mtart from mara APPENDING table itab
        where matnr = I_DATA-matnr.
    endloop.
    better
    if I_DATA[] is not initial.
      select matnr mtart from mara into table itab
        FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
    endif.
    Some Remarks
    - If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
    - You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
    Regards,
    Raymond

  • Select query is not executing

    Hi Friends,
    my code is :
    itab-vbeln = bseg-vbeln.
    if not itab-vbeln is initial.
    select single vbeln inco1 inco2 into ( itab-vbeln itab-inco1 itab-inco2)
    from vbrk where vbeln = itab-vbeln.
    appned itab.
    note : here inco1 inco2 are incoterms
    my question is  can we direct move the values of bseg-vbeln into itab-vbeln. ???
    and i am generating the report with one varient , when i debug this report the
    there is no value in bseg-vbeln. it is showing null value.thats why my select query is not working..but i want execute this select query final.
    in output i want display the inco1 inco2 data.(incoterms)
    any help please.
    urgent.
    regards,
    vijay.

    Hi Vijay,
    First you need to check it out whether <b>itab-vbeln = bseg-vbeln</b> is in with in LOOP or not (<b>if ITAB is intenal table</b>)
    if itab is internal table you should write above statement with in loop, and also check it out in debug mode why bseg-vbeln value is not coming.
    and one more thing you need to make small correction in ur code use ',' .
    select single vbeln inco1 inco2 into ( <b>itab-vbeln, itab-inco1, itab-inco2</b>)
    from vbrk where vbeln = itab-vbeln
    Note: when ever use select single u should pass values into work area, dont use internal table .
    <b>if you have more doubts just send your entire code then i will rewrite it.</b>
    <b>Reward with points if useful.</b>
    Regards,
    Vijay Krishna

  • Have a month number but QaaWs query will not run

    If I type in the parameters for the query it runs with no problem, but when I use the MONTH function that returns the month number the query will not run.
    I think the date serial number is what is being passed even though I see a number being display.  Does anyone know how to conver this MONTH() function to a true number?  This is a converted 4.5 model that works just fine, but looks like they tightened things up in 2008.
    Thanks...
    Tom Nather

    Here is how its setup.  I have a QaaWs query that returns the max date, then Excel functions that calculate the date back 13 months.  One of the functions is MONTH() that returns the month number based on a date stored in a cell, not really a true number.
    I added a vlookup that takes the month from a date field (05/31/2008) and looks up the appropriate NUMBER of the month =VLOOKUP(MONTH(K47),M54:M65,1). Find 5 (which is defined as a number.
    This then is applied to the input side for the Qaaws (Month Number = double) using a Paste Link function from the CONTROLS sheet in excel, and the query then works.
    Anything that is a date always seems to be built off of the date serial number so this was the easiest way to get this to work. 
    I think standards have been tightened up using the Flex language vs. what 4.5 was written in, this works in 4.5 without the necessary conversion.

  • Select query in not working for Count(*)

    Hi,
    Our batch team running one query that is selecting one table TSFHEAD and this query is hanging. Below are diffrent shenario in which the select query is running on this table.
    select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    --not returning any rows and hanging
    select * from tsfhead where create_id = 'BATCH' ---returning rows
    select * from tsfhead where create_date = '26-OCT-12'; --- returning rows
    select count(*) from tsfhead ----not returning rows and hanging
    This table TSFHEAD has 59000 rows.
    SQL> explain plan for select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    Explained.
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 415503093
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 67 | 215 (1)| 00:00:03 |
    |* 1 | TABLE ACCESS FULL| TSFHEAD | 1 | 67 | 215 (1)| 00:00:03 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    1 - filter("CREATE_ID"='BATCH' AND "CREATE_DATE"='26-OCT-12')
    I don't know why this query behaving in this manner.Please help.

    RanVijai_dba wrote:
    Thanks for your reply. But +"select count(*) from tsfhead"+ is hanging and +"select * from tsfhead where create_date = '26-OCT-12' "+ is showing records.It might be showing records, but not necessarily the correct records.
    As sb points out, you are treating dates as strings rather than the DATE datatype. That means you could be querying the wrong data, and your query is also not safe in different environments. It could also effect the query execution plan. Also, as pointed out, you should be ideally using 4 digit years. There were many headaches caused by the use of 2 digit years that most companies corrected as part of the millenium bug fixes prior to the year 2000... well over a decade ago, and most good designs now ensure that 4 digit years are used as standard.
    So your query would be better written as:
    select * from tsfhead where create_date = TO_DATE('26-OCT-2012','DD-MON-YYYY')When you say:
    select count(*) from tsfhead... is hanging, you say the table has around 59000 rows in it, and in reality that's a small amount of records, so a count(*) shouldn't take long at all, even doing a full table scan.
    Post the explain plan for that simple count(*) query for us. (and ensure you use {noformat}{noformat} tags to keep the formatting on the forum, as described in {message:id=9360002})                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Select query does not return rows

    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    the query is not giving result for this particular request sid.75006271 is present in table.

    833560 wrote:
    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    Hi,
    Its very difficult to analyse the query without any data being provided. So I suggest you to debug the above query by keeping basic join condition intact and comment out all the other where conditions for initial run.
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    --AND pr.org_unit_sid = ou.org_unit_sid
    --AND pr.oprtnl_flag = 'A'
    --AND ptr.oprtnl_flag = 'A'
    --AND ou.oprtnl_flag = 'A'
    --AND pr.pa_mode_type_lkpcd = 'BT'
    --AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    --AND pr.pa_rqst_sid = 75006271If if you have given join conditions proper and if data exists ,you can see set of rows displayed.
    Next step is to keep on uncommenting each of the where condition
    AND pr.oprtnl_flag = 'A'Like this you 'll come to the condition which does not match your requirement
    Hope this helps
    Regards,
    Achyut

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • Using parameters in a select query sometimes not working

    I use parameters throughout my code - usually without problem, but for some reason in one case it does not return a result. When I modify the querystring to contain the value instead of using parameters it works. Is it because I'm secting a clob? or is it because I'm using a 9i ODP.net dll against a 10g database? this is c# 2.0
    here's the source code that does not work for me - REQUEST_DATA is a clob:
        public String loadRequest(String PSRNumber)
            String returnVal = null;
            ConnectionStringSettings connectionInfo = System.Configuration.ConfigurationManager.ConnectionStrings["Scribe"];
            OracleConnection myConnection = new OracleConnection();
            String strSQL = "select PSR, REQUEST_DATA from stats.request where PSR = :PSR";
            try
                myConnection.ConnectionString = connectionInfo.ConnectionString;
                OracleCommand cmd = new OracleCommand(strSQL, myConnection);
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add("PSR", OracleDbType.Varchar2).Value = PSRNumber;
                myConnection.Open();
                OracleDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                    returnVal = dr.GetOracleString(dr.GetOrdinal("REQUEST_DATA")).ToString();
                else
                    returnVal = null;
                dr.Dispose();
                cmd.Dispose();
            catch (OracleException ex)
                printError(ex.Message);
            finally
                myConnection.Close();
                myConnection.Dispose();
            return returnVal;
        }when I replace the line generating the sql, and remove the lines pertaining to parameters it works:
    String strSQL = String.Format("select PSR, REQUEST_DATA from stats.request where PSR = {0}", PSRNumber);
    I'm fine just using this as a workaround, but I need an explanation why the other does not work - I prefer to use parameters.
    Message was edited by:
    user633546

    I figured it out. thank you for your help in pointing me in the right direction.
    the problem was there was a trailing space in the data.
    when the data for that table is numeric for every record, the query allows me to leave out the single quotes. Trailing spaces do not seem to cause the database to see it as non-numeric - leaving out the quote still finds the record even if there is a trailing space.
    but when I put in the quote, it is not an exact string match, so it could not find the record. sometimes this flexibility gets me into trouble :\

  • Query is not running after one table exceeds certain records, any limit?

    I have a production database and a reporting database. Production is on version 9.2.0.5 where as Reporting is on 9.2.0.3. I had a query which uses Gl table which grows every month. The query use to take almost same time both in Production as well as Reporting. After the table grew in last couple of months. I observed the query just hangs up in production where as it continues to run in Reporting. Is it the orcale version which makes any difference for the query not to run in prodcution when Gl table had 27 million rows as against 25 million rows a couple of months of ago? Any help is appreciated.

    user5846372 wrote:
    If I use the gl table which was populated until two months ago having less than say 25.2 million rows, the query runs in 2 minutes. If I use the current gl table having current data (total of say 27 million rows) then the query does not even run. From the current gl table if I delete about 2 million records making it 25 illkion rows then the query runs. So I was wondering whether it is the oracle version which makes this difference.Explain your logic that says that after the queries run successfully on different versions, the version difference is now somehow causing the problem - and not the fact that what did change since the last successful run was the the data volumes....
    As for "+the query does not even run+" - it does. Simply that you do not have a clue what it is doing and thus no means to diagnose the problem. And then jump to the conclusion that the version difference is somehow to blame.
    WHAT is that query doing when it seems to "hang"? (it very likely does not hang at all, and is simply very busy with I/O or being blocked from accessing a resource it needs)
    Have you looked at the events and wait states of the query? Have you looked, as Daniel already suggested, at the execution plan?
    You cannot and should not attempt to diagnose a problem, without understanding the problem. If you have no idea what the problem is, how can you simply jump to the conclusion that "+oh, it must be the version difference+"!?
    You can only solve a problem by understanding it. It is that simple. So first understand what the query is doing and why it seems to hang BEFORE you attempt to diagnose and solve it.

  • My select query in not working

    hi
    this my select query
    select * from J_1IEXCHDR where werks = 'DT*'
    this is not working
    i want result where werks like DT01, DT09 and many statting with DT
    so plz tel me how to write for like .
    thank

    Hi,
    >
    Guptaprashant wrote:
    > hi
    >
    > this my select query
    >
    > select * from J_1IEXCHDR where werks = 'DT*'
    >
    >
    > this is not working
    >
    > i want result where werks like DT01, DT09 and many statting with DT
    > so plz tel me how to write for like .
    >
    > thank
    Use:-
    select * from J_1IEXCHDR where werks like 'DT%'.
    Regards,
    Tarun

  • I just wonder why agent scheduler did not run during SAT and SUN?

    Hi guru,
    I just set agent scheduler to run on daily mode but past 2 days which are Saturday and Sunday. It did NOT run. I just see that there is a Weekly mode to check from Monday to Sunday so meaning that I need to use Weekly mode instead, isn't it?? There is no explanation in product manual as well. Someone please help me for this case. Thank you so much in advance.
    Best regards,
    JN

    Hi,
    For me the same is working fine with option daily mode.
    Please cross check the following things .
    Did you selected any active period ?
    Didi you selected any thing other than None execute once in execution cycle tab ?
    Rathish A M

  • Why my GATHER_STATS_JOB is not running?

    Hi All,
    I am on Oracle 10.2 on Linux.
    Since the database is created, we have GATHER_STATS_JOB created, with all default settings. It has been running in past, but has not run in last 2 months.
    In v$parameter, statistics_level = TYPICAL
    When I check in dba_scheduler_jobs, I can see the values,
    schedule_name = MAINTENANCE_WINDOW_GROUP
    schedule_type = WINDOW_GROUP
    enabled = TRUE
    state = SCHEDULED
    job_priority = 3
    and all other default values, along with a proper last_start_date.
    Why it has not run in last 2 months ?
    In this database, some good amount of batch processing kicks off in the evening, say 7pm and goes on till 11pm. The maintainance window for Oracle's stats starts at 10pm on week days. Will this affect the GATHER_STATS_JOB ?
    I think, the stats job should still start. May be, if the database is very busy, it can kick off later than 10pm, but should kick off for sure.
    Is there any other parameter or condition, stopping stats job from running ?
    Thanks in advance

    Hi,
    If I say, one of the job queue processes are used to run scheduled job, is that correct? Job queue processes (J000 to J999) are also used for MView refresh, AQ processing etc etc.
    I want to check, which processes are using the job queue processes. Is it possible?
    When the instance starts, if job_queue_processes parameter is say, 10. Then there will be 10 processes j000 to J009 running. How can I find out, which processes/programs are using those processes at any given time?
    Ideas please.
    Thanks

  • Why will Firefox 4 not run on my Mac G4, OS 10.4.11?

    When prompted and encouraged by you yesterday I downloaded Firefox 4. However it was not possible to use it because it came up with the message that It "is not supported by this architecture" I then found that I could not run my earlier version of Firefox 3.6.16. So I had to delete all firefox versions, and redownload version 3.6.16 losing various previous settings in the process. I am now using the old version once more quite successfully but I am concerned that you will not be supporting it for very long

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox

Maybe you are looking for

  • Link discoverer  reports  with E-businees Suite  R12

    Can anyone help me with this statement 3.3.3 Parameters : mode=DISCO&workbook=<workbook identifier from step2>&parameters=Disco parameter name M~Parameter M Value* what am i suppose to put in "parameter name " is it the worksheet name?

  • Ios 8 Bluetooth Sync with My Ford Touch issues. Phone calls????

    I own a Ford dealership and I just got the new iphone 6 yesterday and I try to hook it up with any of my Ford or Lincoln cars with My Ford touch with version 3.6 and all I can do it bluetooth audio. When I make a call It will not go through the car.

  • Site says java not installed

    I have deleated java and reinstalled from sun but still I can communicate because the site cannot find java on my firefox. It is my bank site and there was no problem earlyer

  • Dynamic TABLE parameter in Sub routine call

    Hi, Is it possible to have a dynamic TABLE parameter in a sub-routine call? The structure of the internal table will be different during different calls to the sub-routine. I have a subroutine which has the FM "HR_INFOTYPE_OPERATION" to update the in

  • Geforce titan or quadro k4000?

    Hello all - I'm hoping to get a little help/clarification on which card would better suit my needs, and appreciate any/all help. I'm probably at an intermediate level of understanding when it comes to the technical aspects of computers, so some of th