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

Similar Messages

  • 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

  • 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 :\

  • 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})                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • XQuery select query is not working in proper speed

    In our project we have large no. data (its a property listing site) and I'm storing that data to Barkeley DB (XML DB). The problem is when I am searching for a property it will list the first 10 property quickly(100% speed). Then I'm going to 2dn, 3rd page its working in the same speed. But if I'm going to 10th(30% speed) or 100th or 1500th(15%speed) page is working very slowly.
    Following are my query:
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    And some times query will change like the following way based on the filter option in my page(means sort by only sale_price field):
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    then from the first page its self its performance is very slow(15%).
    Could you please check my query and help me to solve the issue...
    Thank you,
    Vijesh

    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

  • 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

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • 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

  • Query is not working correctly

    Hi all,
    Below query is not working correctly. Please let me know, if you find the mistake
    select
    a.name,
    b.VOD_NAME,
    count(xm.ATTRIB_03)
    from
    siebel.s_vod b
    left outer join ISS_OBJ_DEF c on b.OBJECT_NUM=c.PAR_VOD_ID
    left outer join vod d on c.VOD_ID=d.row_id
    left outer join PROD_INT a on d.OBJECT_NUM=a.CFG_MODEL_ID
    left outer join PROD_INT_XM xm on a.row_id=xm.PAR_ROW_ID
    where
    b.VOD_TYPE_CD='CLASS_DEF'
    and
    c.LAST_VERS = 0
    and
    b.vod_name='Componentes'
    group by a.name,b.vod_name having count(xm.ATTRIB_03) >=5

    user9522927 wrote:
    Hi all,
    Below query is not working correctly. Please let me know, if you find the mistake
    select
    a.name,
    b.VOD_NAME,
    count(xm.ATTRIB_03)
    from
    siebel.s_vod b
    left outer join ISS_OBJ_DEF c on b.OBJECT_NUM=c.PAR_VOD_ID
    left outer join vod d on c.VOD_ID=d.row_id
    left outer join PROD_INT a on d.OBJECT_NUM=a.CFG_MODEL_ID
    left outer join PROD_INT_XM xm on a.row_id=xm.PAR_ROW_ID
    where
    b.VOD_TYPE_CD='CLASS_DEF'
    and
    c.LAST_VERS = 0
    and
    b.vod_name='Componentes'
    group by a.name,b.vod_name having count(xm.ATTRIB_03) >=5I couldn't see through the internet what happend when you ran said query. How about helping us out by showing us the evidence that it "is not working correctly".
    "Here's a picture of my car sitting in the driveway. Why won't it start?"

  • DA for Select List is not working

    Hi friends,
    I have a two fields in my form.
    <li>person id
    <li>Manager Name(Select List)
    I have given a default value for person id as'270'. So i need to write an dynamic action so that it will fetch the manager name according to the person id '270'.
    Since My manager Name is an Select List type, i have given the following query in the LOV definition of this item
    select papf.full_name d, papf.person_id r
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145
    order by 1   This is the DA, that i wrote for the person id column.
    For the true action, i have given as 'Set Value' and given the following query
    select supf.full_name
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145 and papf.person_id = :P6_PERSON_IDPage item to submit: P6_PERSON_ID
    Affected Element: P6_MANAGER_NAME.
    Soon after the page load, the manger field has to show the corresponding manager name in the LOV according to the value '270' which is in the person id item. But it is not showing the corresponding name in the select list item.
    Suppose, if the manager name item is in 'display only' means it is working, but if the manager name field is in LOV means it is not fetching the value and it is displaying only the null display value in that field.
    I dont know why the DA is not working if the field is in LOV.
    Brgds,
    Mini

    Hi Patrick,
    Thanks, and this is the mistake that i made and it worked now fine.
    I have Certain questions for you:
    <li> Currently, i can able to send mails from APEX using APEX_MAIL, but APEX_MAIL will support only in the unauthenticated mail server. Since in our organization we have configured an unauthenticated mail server and we are using that server for the APEX mail process. The problem that im facing now is, this mail server is been used in our organization entirely for all the purpose, except the official mail.[For official mail purpose we are using Yahoo server, which is an authenticated server, and we are using that Yahoo mail server only for your official mail purpose].
    For remaining all the purpose including the APEX mail process too we are using the unauthenticated mail server that we configured. Since we are make using of unauthenticated mail server for all the purpose and due to that, the mail process is getting very slow and i couldnt able to receive the mail from the APEX in time(via) this unauthenticated mail server.
    So, due to that i thought of using the Yahoo mail server(which is an authenticated mail server). But APEX_MAIL doesnot support for the authenticated server, then how i can use the authenticated mail server for sending the mail via APEX. How i can able to access the Yahoo mail authenticated server from Oracle Database.(i have also enabled ACL in my DB too).
    <li> Second question, is how i can able to refer the APPLICATION PROCESS in my application. Other than calling that APPLICATION PROCESS In javascript, it is possible to call that APPLICATION PROCESS in the plsql anonymous block.
    Brgds,
    Mini

  • SELECT DISTINCT does not work - Another Problem!

    Dear All
    Previous Post
    I just posted a thread, which has been answered by an expert. It's here:
    SELECT DISTINCT does not work. Why?
    My original problem was that the Query returned duplicate records, and SELECT DISTINCT did not work.
    The solution was to change this select:
    T0.[U_SupInv]      AS 'Link'
    ... to this:
    CAST(T0.[U_SupInv] as nvarchar(100))      AS 'Link'
    The amended Query worked.
    New Problem
    I just discovered that resolving the problem created a new one.
    The field U_SupInv (Link) is in fact a UDF.
    I created it so that all Suppliers' Invoices could be Scanned to pdf files, and these pdf could be linked
    to the respective AP Invoice.
    Originally, when I clicked 'Link' in my Query results, the pdf scan pops up.
    When the Query is amended by adding CAST, the link becomes dead.
    Help
    Could anyone tell me how I can make SELECT DISTINCT work, as well keeping the LINKS live?
    The main purpose of my Query is to help users view the pdf scans by clicking on the links.
    Thanks
    Leon Lai
    Here's my Original Query
    SELECT
    T0.[UpdateDate] AS 'Update Dt',
    T0.[TaxDate] AS 'Doc Dt',
    CASE T5.[TransType]
         WHEN '18' THEN 'PU ' + CONVERT(VARCHAR(6), T0.[DocNum])
         WHEN '19' THEN 'PC ' + CONVERT(VARCHAR(6), T0.[DocNum])
    END 'SAP Ref.',
    T1.[ImportLog]     AS 'Ship #',
    T0.[CardCode] + '' AS 'Supplier #',
    T0.[CardName]      AS 'Supplier Name',
    T0.[DocTotal]      AS 'Rs',
    T1.[BlockNum]      AS 'Reqn #',
    T0.[DocNum]        AS 'Doc No',
    T0.[U_SupInv]      AS 'Link'
    FROM klship.[dbo].[OPCH] T0
    INNER JOIN klship.[dbo].[PCH1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN klship.[dbo].[OJDT] T5 ON T0.[TransID] = T5.[TransID]
    WHERE
    (T0.[UpdateDate] >= '[%2]' AND
    T0.[UpdateDate]  <= '[%3]' AND
    T0.[U_SupInv] IS NULL)
    OR
    (T0.[UpdateDate] >= '[%4]' AND
    T0.[UpdateDate]  <= '[%5]' AND
    T0.[U_SupInv] IS NOT NULL)
    FOR BROWSE

    Dear István Korös,
    Thanks a lot for your answer.
    I will test your suggestion tomorrow, as it's night and I am returning home now.
    However, I do not think it will suit my requirements for the foll reasons:
    - I worked hard to get rid of the need to enter anything in the @Scan2 field.
    - This UDF was created solely as a text of instruction for my staff.
       Unfortunately I had to fill in something to make the Query work.
    - The problem is that if the user forgets to click the drop-down arrow and leaves @Scan2
       blank, the query does not work.
    - With the help of another expert, I succeeded in ignoring @Scan2 altogether.
    - I posted only a simplified version of my Query on the forum, without the codes relating to eliminating the
      need to enter something in @Scan2, so you may not be aware of my requirement.
    - I hope you understand my reluctance. But I will try your suggestion nevertheless.
    My Suggestion
    I think using PCH1.VISORDER may be the solution.
    If we select only those rows where visorder = 0, then
       - there will be no duplication
       - I need not use SELECT DISTINCT
       - All my LINKS to pdf files will be live because I need not use CAST
       - I may retain that part of my Query which permits ignoring @Scan2 altogether.
    - A Dream!-
    The problem is that I don't know how and where  to place that VISORDER.
    If you think I may be right, could you help me along that line?
    Best Regards
    Leon Lai

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Select() function is not working properly in solaris 10.

    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.
    Thanks a lot.
    Regards,
    Srikanth.

    haisrig wrote:
    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.Hi
    It sounds to me that you've been lucky for 20 years then.
    Local POD variables on the stack that aren't explicitly initialized can contain any value. Here's what I see in your app with dbx
    (dbx) run
    Running: sel
    stopped in main at line 9 in file "sel.cpp"
        9      sleeptime.tv_sec = 60;
    (dbx) print sleeptime
    sleeptime = {
        tv_sec  = -4198732
        tv_usec = 0
    }That's on a Solaris 10 SPARC machine. If I try it on a Solaris 10 x86 box then I get
    (dbx) print sleeptime
    sleeptime = {
    tv_sec = -830490588
    tv_usec = 134510556
    and I see the behaviour that you describe.
    Paul

  • LOV single selection list is not working in my JDeveloper 10.1.2.3

    Hi!
    I'm stumped with this. I'm also new to JDeveloper. I used the sample tutorial from the OTN website entitled "JSPDataBoundLists.jws" to learn how to create drop-down lists in JDeveloper.
    My problem is I created a single selection list LOV from DepartmentListView Data Control and pasted it into an EmployeesView Input form. This is so I can just select the Department names to populate the DepartmentID field in Employees table. I setup the data binding in the UI Model of my jsp using the "List Binding Editor". I checked the UIModel file and it looks as follows:
    <DCControl
    id="DepartmentId2"
    SubType="DCListSingleSel"
    IterBinding="EmployeesViewIterator"
    DTClass="oracle.adf.dt.objects.JUDTCtrlListLOV"
    ApplyValidation="false"
    isDynamic="false"
    ListOperMode="0"
    ListIter="DepartmentsListViewIterator" >
    <AttrNames>
    <Item Value="DepartmentId" />
    </AttrNames>
    <ListAttrNames>
    <Item Value="DepartmentId" />
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="DepartmentName" />
    </ListDisplayAttrNames>
    </DCControl>
    I run the jsp, selected a value from the drop-down list, do a submit and do a commit, but the DepartmentId from the DepartmentsListView was not stored in Employees. What is wierd here is that there is an exact same single selection list defined a row above mine which is working fine. How come that one is working and mine is not?

    Eureka! I finally found the answer to my own question!
    This simple problem of adding a drop-down list into a jsp page cost me 3 whole days (around 24 full working hours) to find the answer. Normally it only takes me a few minutes with the other web app languages I've learned. And I just stumbled into the answer just a few minutes ago (maybe all thanks should be given to God whom let me stumble into the answer since me and my wife have been praying for several weeks now ever since I started trying to learn Oracle JDeveloper. It is really very very difficult and time consuming to learn compared to other web app languages and tools).
    Anyway, the reason why my LOV does not work in my jsps using JDeveloper 10.1.2.3 is because JDeveloper 10.1.2.3 seems to allow only one input-form-element for the same field of the input table!
    For example, what happened to me was I had an input form created for the Employees table in the HR schema. I did this simply by drag-and-drop from the "Data Control Palette". This feature I like very much with JDeveloper. It is really easy and works instantly. And then, I drag-and-drop the departmentname field from the Departments table as a "single selection list" into the jsp and setup its bindings. So when I run the jsp, viola! The drop-down list does not populate the DepartmentId field of the Employees table. IT DOES NOT WORK! I've tried reinstalling both JDev and Oracle db and JDKs to no avail! I tried posting in this forum to no avail! I tried experimenting with newly created jsps to no avail! Then suddenly after repeatedly experimenting on this on different tutorials, guides and my own web app, it works! Why did it work? It was because I tried to add an LOV-single-selection-list on another sample tutorial with a READ-ONLY FORM on the jsp! Thus only the LOV is the input-form-element in the jsp for the table's field.
    So why can't you find such a simple and basic fact anywhere in the web, the tutorials, guides or the forum? I do not know. Maybe only I am using such an old version of JDev? But what about the users who used it when it just got out a couple of years ago? Didn't they have the same problem? Anyway, it seems like the answer to a lot of my simple basic questions about JDeveloper is not documented, or is buried very deep beneath all the other words of all these documents. Hopefully JDeveloper's documentations would get a lot easier to use very very soon!

Maybe you are looking for

  • Frustrating lack of phone service - bad wires, bad...

    Hi there, I have been without phone or broadband now since 20th March. Over the last month i have made over 15 calls to the BT support numbers, had two engineers out (the first didnt turn up) and have a 3rd on the way. Basically, after the first run

  • Srm 7.0 - Transfer of Supplier - Temporary Contact Person Creation

    SRM 7.0/ECC 6.04 During transfer of supplier from supplier directory from ROS/SUS to EBP client, and vendor replication from ECC to SRM as Supplier Portal the system is not creating temporary contact peson. Per SAP documentation if the Temporary cont

  • Can I take screenshot of my ADF Mobile Screen or Send HTML email containing pics

    I'm using Jdeveloper 11.1.2.4 with the latest Adf mobile extension in my mobile application I've an amx page that contains some data and i need to take printscreen of this page and save to the mobile or Send this page with the pictures appear on it a

  • Moving from XP

    I currently use a Dell XP system.  Dell computer, keyboard, display.  If I buy an Mac Mini, will it work with the Dell keyboard and display?

  • Appending Items to Forms and their IDs

    Can anyone here share how to catch the ID of the appended item to a form and store it in an array. After which I store it in an array, i will call the delete() function through out the elements of an array to clear the contents of a form. I'm trying