JPA -- Inheritance with duplicate column names

Hi,
I have the following problem:
I have two tables. Let's call them BASE_TABLE and CHILD_TABLE. They are mapped through Join Inheritance in Java. In other words:
@Inheritance(strategy=InheritanceType.JOINED)Let's say, the tables look like:
BASE_TABLE (
    ID NUMBER(18),
    TYPE VARCHAR2(1),
    CODE NUMBER(5))
CHILD_TABLE (
    ID NUMBER(18),
    CODE NUMBER(5),
    NAME VARCHAR2(50))Here's where the problem lies: I have duplicate column names. In my example, this is the CODE column. When mapping to Java classes, I can have something like:
@Entity
@Table(name="BASE_TABLE")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue("0")
class BaseEntity {
    @Column(name="CODE")
    private Integer code;
    public Integer getCode_Base() {
        return code;
    public setCode_Base(Integer code) {
        this.code = code;
@Entity
@Table(name="CHILD_TABLE")
@DiscriminatorValue("1")
@PrimaryKeyJoinColumn(name="ID")
class ChildEntity extends BaseEntity {
    @Column(name="CODE")
    private Integer code;
    public Integer getCode() {
        return code;
    public setCode(Integer code) {
        this.code = code;
}The trouble is, that TopLink only handles ONE of the CODE columns. When SELECTing, it only selects the CODE column from table BASE_TABLE. When generating DML statements, again it only uses the CODE column from table BASE_TABLE.
I wasn't able to make it use BOTH columns.
Please, help. The DB design cannot be changed at the moment. However, I must find a way to make TopLink Essentials use both CODE columns, not just the one from BASE_TABLE.
Thank you in advance!
Best regards,
Bisser

Hi Chris,
I was under the impression, that since the attributes were private, they would be treated as two different attributes by TopLink Essentials.
Java definitely treats them as two different attributes, and not as one overriding the other. I had made sure that I could set both of them with different values (via the differently named accessors) and, indeed, both values were there. I printed them both out on the console, just to make sure. They were printed out ok, the values were indeed different.
But TopLink Essentials was ignoring one of them.
Now that you told me that I should use different names for the attributes, I did just that. And lo and behold, it worked!!! I couldn't even imagine that it would matter to TopLink what the names were, given that they were in two different entities that were mapped to two different tables, inheritance or not.
As I said, Java treats them as two completely different attributes, unlike TopLink Essentials. In future, I will know that even the attribute names matter. Thank you again.
Best regards,
Bisser

Similar Messages

  • CREATE INDEX WITH DUPLICATE COLUMN NAME

    Hi,
    i need to interface our application with an Orale Bridge to CREATE INDEX with duplcate column Name.
    For Example
    CREATE index NLOT_FOURNLOT_idx ON NLOT(FOURNISSEUR ,NOLOT ,FOURNISSEUR ,NOBLFOUNISSEUR,NOLIGNEBL ,NOLOT ,QTECOLISRECUES ,CODENONQUALITE ,QTECOLISACCEPTE);
    CREATE table NLOT(
    FOURNISSEUR VARCHAR2(09)
    ,NOBLFOURNISSEUR VARCHAR2(13)
    ,NOLIGNEBL VARCHAR2(03)
    ,NOLOT VARCHAR2(20)
    ,QTECOLISRECUES VARCHAR2(10)
    ,CODENONQUALITE VARCHAR2(02)
    ,QTECOLISACCEPTE VARCHAR2(10)
    ,NOMBREDECOLISRE VARCHAR2(10)
    ,NOMBREDECOLISAC VARCHAR2(10)
    ,FILLER VARCHAR2(1)
    ,FILLE1 VARCHAR2(1)
    ,TYPEREFERENCE VARCHAR2(01)
    ,REFERENC1 VARCHAR2(15)
    ,CONTROLERECEPTI VARCHAR2(01)
    ,DATEDEPEREMPTIO VARCHAR2(8)
    ,CONTROLEPROCHAI VARCHAR2(1)
    Thanks
    Philippe

    Well, you can't do it. ORA-957 is one of those irrevocable errors for which the solution is to remove the duplicate name from the SQL statement.
    But, anyway, why do you want to do this? I would guess there's no performance benefit from having the same column indexed twice (of course it's impossible to test this, so it's just my opinion).
    Cheers, APC

  • Generating Duplicate Columns Names in CMP's

    Hi,
    We are having trouble with the automatic key generation of the CMP beans. We are using java.lang.Object as primary key class and the autogenerated col is ejb_pk but still it doesnt work.
    The Generated Class files show the insert and update statements with duplicate column names.
    The exception trace is
    <i>
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed.
    The persistent object is com.ejb.PriorityCMP220Persistent.
    at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:106)
    at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:380)
    at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:343)
    at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletionTransactionContext.java:446)
    at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:230) ... 50
    more Caused by: java.sql.SQLException: [SAP_Portals][SQLServer JDBC Driver][SQLServer]Column name 'PRIORITY_ID' appears more than once in the result column list. </i>
    We are using p9 sqlserver driver . Is it something related to driver problem or some configuration issue.
    Please Suggest,
    Thanks,
    Mukul.
    Edited by: Mukul Mangla on Mar 25, 2009 2:03 PM

    As stated by Ken, the Organizer does not consider duplicate file names as duplicate files : the full path with folder hierarchy is taken into account. I have the same situation than you with my camera limited to 10 000 ... I am working with this fact since 1999, and I have no organization problem with that. Absolutely no necessity to rename in my case, but you may have other requirements ?
    If so, it's good to know that you can use the downloader to rename at the import stage (hence the questions of Ken about the way you import).
    You mentionned batch renaming : that can only be made from within the organizer, and I would seriously recommend thinking twice before deciding to do so, a full backup before that being a must.

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • Duplicate column name when inserting a batch to biztalk

    I wonder why I get the following error:
    The adapter failed to transmit message going to send port "SEND_PORT_TESTORCHESTRATION_00010" with URL "oracledb://OracleServer/?PollingId=TEST_ORCHESTRATION_ORACLE_00010". It will be retransmitted after the retry interval specified for
    this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.TargetSystemException: ORA-06550: line 2, column 290:
    PL/SQL: ORA-00957: duplicate column name
    ORA-06550: line 2, column 1:
    PL/SQL: SQL Statement ignored ---> Oracle.DataAccess.Client.OracleException: ORA-06550: line 2, column 290:
    PL/SQL: ORA-00957: duplicate column name
    ORA-06550: line 2, column 1:
    PL/SQL: SQL Statement ignored
       at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
       at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
       at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
       at Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteNonQuery(OracleCommand command, OracleCommonExecutionHelper executionHelper)
       --- End of inner exception stack trace ---
    When I tried to pull a batch from sql server to insert to an oracle table. I have checked and none of the records were duplicate or had the same key. If I sent a batch of only 1 record, it went through fine and oracle database was updated.
    However, in either cases, no response from Oracle were received. I had a FILE port to save oracle response to file because the oracle port in the orchestration was 2 way (Send/Receive) port.
    Why was BizTalk not writing the response to file?
    Your hint/instruction to shed some light to this mystery is highly appreciated. Thanks!
    Note: When I tried to look the orchestration debugger, I saw the same message from sql being transmitted twice...why is BizTalk doing that?

    Hi BoatSeller,
    I think it may be something related to the map, I just do not know what. This is what I saw from the message part:
    <ns0:Insert xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/ORACLETABLE/Table/ROTATION_REQ">
    <ns0:RECORDSET>
    <ns0:ROTATION_REQRECORDINSERT>
    <ns0:RotationID>D4-2015-CO1</ns0:RotationID>
    <ns0:RotationID>D4-015-GL1</ns0:RotationID>
    <ns0:Year>2015</ns0:Year>
    <ns0:Year>2015</ns0:Year>
    <ns0:Class>D4</ns0:Class>
    <ns0:Class>D4</ns0:Class>
    <ns0:Rotation>CROSSOVER</ns0:Rotation>
    <ns0:Rotation>GOOCHLAND CLINIC</ns0:Rotation>
    <ns0:From>2014-08-06</ns0:From>
    <ns0:From>2014-05-20</ns0:From>
    <ns0:To>2015-03-05</ns0:To>
    <ns0:To>2015-03-05</ns0:To>
    <ns0:NumberOfConsecutiveSession>1</ns0:NumberOfConsecutiveSession>
    <ns0:NumberOfConsecutiveSession>1</ns0:NumberOfConsecutiveSession>
    <ns0:AmOrPM InlineValue="1"></ns0:AmOrPM>
    <ns0:AmOrPM InlineValue="2"></ns0:AmOrPM>
    <ns0:DayOfWeek>5</ns0:DayOfWeek>
    <ns0:DayOfWeek>4</ns0:DayOfWeek>
    </ns0:ROTATION_REQRECORDINSERT>
    </ns0:RECORDSET>
    </ns0:Insert>
    I thought that would be an issue because it looks like it was repeating the content, but if I understand you correctly, this is what the message content supposed to be? If not, what should I change in the map so that Oracle will get the following?
    <Record1> <field1>..</field1><field2>..</field2></Record1>
    <Record2> <field1>..</field1><field2>..</field2></Record2>
    This is the print screen of my orchestration debugger:
    If this is a problem, how should I fix this?
    And this is my mapping:
    Thanks,

  • Data subsetting [ORA-00957: duplicate column name]

    I want to select only rows with a certain id from a table.
    The code for the publication :
    SELECT * FROM ZOO.ANIMAL A, ZOO.TYPE_ANIMAL TA, ZOO.ANIMAL_EMPLOYE AE WHERE A.IDTYPEANIMAL = TA.IDTYPEANIMAL AND TA.IDTYPEANIMAL = AE.IDTYPEANIMAL AND AE.IDEMPLOYE = :employe
    When i publish with .jar, i have this error :
    ORA-00957: duplicate column name
    What is the problem ? The query works in iSQL*Plus !
    Thanks
    Message was edited by:
    user460585

    Hi,
    I guess that you are tired or something …
    01 update requisicoes set
    02 requisicao_num = '4321',
    03 requisicao_desc = 'dfgb',
    04 empresa_id = 3,
    05 posicao_id = 2, -- equals to 14
    06 solicitante = 'dfvsdfv',
    07 centrodecusto_solicitante = '5131',
    08 centrodecusto_executante = '5151',
    09 centrodecusto_aplicacao = '5141',
    10 data_saida = to_date('12/12/2004', 'dd/mm/yyyy'),
    11 data_desejada = to_date('12/12/2004', 'dd/mm/yyyy'),
    12 prioridade_id = 1,
    13 observacao = 'sgfbfdgbdfgb',
    14 posicao_id = 2
    15 where requisicao_id = 3
    Don’t you have:
    posicao_id = 2 in 5th line and in the 14th line ??
    Bye,
    Vitor

  • Duplicate Column Name: VIEW

    Hi. Im writing a VIEW:
    CREATE OR REPLACE VIEW viewexample AS
    SELECT c.customer_id, c.details, o.order_id,
    o.details, op.product_id, op.description
    FROM customer c, order o, order_product op
    (...more... )
    Yet, i get this message:
    duplicate column name
    And its pointing to line 3. Any ideas?

    A problem has arisen.
    I have developed this View further but it seems im getting a Cartesian product.
    I am not tip-top on joins, but i included some inner joins that i thought would not return a Cartesian.
    Here is the code:
    CREATE OR REPLACE VIEW myview AS
         SELECT      co.order_id,
              o.description o_d,
              co.customer_id,
              cp.product_description,
              c.name c_n
         FROM     customer_order co, order o, customer c,
              customer_product cp
         WHERE     cp.product_description BETWEEN
              '000' AND '010'
         AND      co.order_id = o.order_id
         AND     co.customer_id = c.customer_id;
    with the select statment:
    select * from myview;
    I am expecting 10 selections, yet i recieve about 1000.
    Any ideas?

  • ORA-00957: duplicate column name

    When I am enableversioning of a table, I get following error messages:
    SQL> execute dbms_wm.enableversioning('transcript');
    BEGIN dbms_wm.enableversioning('transcript'); END;
    ERROR at line 1:
    ORA-00957: duplicate column name
    ORA-06512: at "SYS.LTDDL", line 399
    ORA-06512: at "SYS.LTDDL", line 1117
    ORA-06512: at "SYS.LT", line 7181
    ORA-06512: at line 1
    I checked the column name that will be add by dbms_wm package and did not see any column which would cause this problem.
    Could some one give me the list of reserved column names for dbms_wm package?
    Thanks
    Ashley

    Ashley
    These are some the reserved words used by OWM in its internal views. These can also conflict on enable versioning
    statements.
    RIDCHILD RIDBASE RIDPARENT CHILDSTATE PARENTSTATE BASEDS CHILDDS PARENTDS
    FIRSTCHILDVER CHILDVER PARENTVER POS RID VERSION NEXTVER DELSTATUS
    LTLOCK
    In the release after 9iR2, we have augmented reserved words with a prefix that will commonly not conflict with
    user schema column names.
    Let me know if you were able to identify the reserve word conflict.
    Arun
    [email protected]

  • Selecting from a SQL Server 2005 with long column names ( 30 chars)

    Hi,
    I was able to set up a db link from Oracle 11.2.0.1 to SQL Server 2005 using DG4ODBC.
    My problem is that some column names in the Sql Server are longer than 30 chars and trying to select them gives me the ORA-00972: identifier is too long error.
    If I omit these columns the select succeeds.
    I know I can create a view in the sql server and query it instead of the original table, but I was wondering if there's a way to overcome it with sql.
    My select looks like this:
    select "good_column_name" from sometable@sqlserver_dblink -- this works
    select "good_column_name","very_long_column_name>30 chars" from sometable@sqlserver_dblink -- ORA-00972Thanks

    I tried creating a view with shorter column names but selecting from the view still returns an error.
    create view v_Boards as (select [9650_BoardId] as BoardId, [9651_BoardType] as BoardType, [9652_HardwareVendor] as
    HardwareVendor, [9653_BoardVersion] as BoardVersion, [9654_BoardName] as BoardName, [9655_BoardDescription] as BoardDescription,
    [9656_SlotNumber] as SlotNumber, [9670_SegmentId] as SegmentId, [MasterID] as MasterID, [9657_BoardHostName] as BoardHostName,
    [9658_BoardManagementUsername] as BoardManagementUsername, [9659_BoardManagementPassword] as BoardManagementPassword,
    [9660_BoardManagementVirtualAddress] as BoardManagementVirtualAddress, [9661_BoardManagementTelnetLoginPrompt] as
    MANAGEMENTTELNETLOGINPROMPT, [9662_BoardManagementTelnetPasswordPrompt] as MANAGEMENTTELNETPASSPROMPT,
    [9663_BoardManagementTelnetCommandPrompt] as MANAGEMENTTELNETCOMMANDPROMPT FROM Boards)performing a select * from this view in sqlserver works and show the short column names
    this is the error i'm getting for performing a select * from v_boards@sqlserver_dblink
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetLoginProm'. {42S22,NativeErr = 207}[Microsoft]
    [SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetPasswordP'. {42S22,NativeErr = 207}[Microsoft][SQL Native
    Client][SQL Server]Invalid column name 'BoardManagementTelnetCommandPr'. {42S22,NativeErr = 207}[Microsoft][SQL Native Client][SQL
    Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
    ORA-02063: preceding 2 lines from sqlserver_dblinkI also tried replacing the * with specific column names but it fails on the columns that have a long name (it doesn't recognize the short names from the view)
    what am I doing wrong?
    Edited by: Pyrocks on Dec 22, 2010 3:58 PM

  • Is it possible to create a Synonym with different column names

    Hi,
    I want to create a Synonym with different columns names (Columns not in original table) . I am not sure if this can be done . Any suggessions...
    Thanks in advance....

    Synonyms are not limited to tables. Accroding to the SQL Reference, a synonym is:
    an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym.
    In fact, synonyms are not even validated until they are used:
    SQL> create synonym my_synonym for table_which_does_not_exist;
    Synonym created
    SQL> select * from my_synonym;
    select * from my_synonym
    ORA-00980: synonym translation is no longer valid

  • Alias required in SELECT list of cursors to avoid duplicate column names

    I got some error messages while compiling the following.
    DECLARE
         alert_id                              NUMBER;
         CURSOR cur_search IS SELECT c.item_description,
         d.name modelname,
         SUM(b.quentaty),
         SUM(b.balence)
         FROM      item_procurement_history_dtl a,
                        item_procurement_history b,
                        item_master c,
                        model_master d
         WHERE a.item_code = b.item_code
         AND a.lot_no = b.lot_no
         AND a.item_code = c.item_code
         AND b.modelcode = d.modelcode
         AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
         AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
         AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
         GROUP BY c.item_description, d.name
         ORDER BY c.item_description, d.name;
    BEGIN
         GO_BLOCK('blk_stock_search_fields');
         CLEAR_BLOCK(NO_VALIDATE);
         FOR i IN cur_search LOOP
         :blk_stock_search_data.item_name                := i.item_description;
              :blk_stock_search_data.modelname               := i.modelname;
              :blk_stock_search_data.tot_qty                    := i.tot_qty;
              :blk_stock_search_data.available_qty     := i.available_qty;
              NEXT_RECORD;
         END LOOP;
         FIRST_RECORD;
         GO_ITEM('blk_stock_search_fields.pb_search');
    END;
    The error is as follows :-
    Error 403 at line 23 column 2
    Alias required in SELECT list of cursors to avoid duplicate column names.
    What will be the solution for this error?
    Thanx and Regards,
    Vikas

    Vikas,
    The problem is that you are referencing a column name in your LOOP that does not exist in your CURSOR. Therefore, Oracle has interpreted this to its BEST guess Exception. This can be resolved as follows:
    DECLARE
       alert_id NUMBER;
       CURSOR cur_search IS
          SELECT c.item_description,
                 d.name modelname,
                 /* You need to ALIAS the product of the SUM() so you can reference it by name.*/
                 SUM(b.quentaty) AS tot_qty,
                 /* Same issue here, you must ALIAS the SUM() of Balance in order to reference it by a name.*/
                 SUM(b.balence) as available_qty
            FROM item_procurement_history_dtl a,
                 item_procurement_history b,
                 item_master c,
                 model_master d
           WHERE a.item_code = b.item_code
             AND a.lot_no = b.lot_no
             AND a.item_code = c.item_code
             AND b.modelcode = d.modelcode
             AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
             AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
             AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
           GROUP BY c.item_description, d.name
           ORDER BY c.item_description, d.name;
    BEGIN
       GO_BLOCK('blk_stock_search_fields');
       CLEAR_BLOCK(NO_VALIDATE);
       FOR i IN cur_search LOOP
          :blk_stock_search_data.item_name := i.item_description;
          :blk_stock_search_data.modelname := i.modelname;
          :blk_stock_search_data.tot_qty := i.tot_qty;
          :blk_stock_search_data.available_qty := i.available_qty;
          NEXT_RECORD;
       END LOOP;
       FIRST_RECORD;
       GO_ITEM('blk_stock_search_fields.pb_search');
    END;Just an observation. Also, There are some misspellings in your cursor. Does this match your table?
    Hope this helps.
    Craig...

  • Membership rules does not work with UDF column name having the max length

    Found a bug in OIM .
    Membership rules does not work with UDF column name having the maximum length
    Steps to Reproduce
    1.Create a UDF having max column name length for eg UDF_USR_PERSONAL_SUB_DOMAIN_CO (lable = Personal Code)
    2. Create a simple Rule like Personal Code = 7000
    3. Assign this Rule as a member ship rule of a Group.
    4. Create a user with Personal Code = 7000.
    5. User doesnot get the group membership.
    Thanks
    Suren

    Yes , i verified logs as well .
    If you just decrease the column name length , w/o making change to any other attributes , it starts working ..
    Thanks
    Suren

  • Many to many join table with different column names

    Hi have a joint table with different column names as foreign keys in the joining
    tables...
    e.g. i have a many to many reltnshp btwn Table A and Table B ..and join table
    C
    both have a column called pk.
    and the join table C has columns call fk1 and fk2
    does cmd require the same column name in the join table as in the joining table?
    are there any workarounds?
    thanks

    HI,
    No, the foreign key column names in the join table do not have to match the primary
    key names in the joined tables.
    -thorick

  • Strange behavior in BI Publisher with long column names from BI Answers

    Hello all!
    I have created a BI Answers request with few calculated columns in form of
    case when <condition> then <value if true> else <value if false> end
    Then in BI Publisher Desktop designed a report ttemplate based on saved BI Answers request and noticed that for calculated columns their names look strange:
    CASEWHEN_<condition>THEN...ELSE..._...END__
    Some of the column names are about 100 characters long.
    After running the report from Word found that for these "long length named columns" there's no data in the output.
    Do someone else experience the same? Any workarounds?
    Regards,
    mr.maverick

    This is because the length for the formula is restricted in publisher. you have to either reduce the size of the column name in answers or change the formula. another workaround is completely pasting the formula directly in the word template instead of placing the formula inside the form field. you can add maximum of 300 characters i guess. you can edit the formula for the form field in the form field options formuals menu.

  • Where statement on two different tables with same column name

    Hello,
    I have 2 financial tables:
    tblincome, tblexpenses
    in each table I have column name "monthPayed" (have values of all the months of the year).
    I would like to create a balance view table that will show me the financial status for the Q1 (for example).
    I have a column totalIncome and totalExpended respectively.
    I've create a view table that shows me the financial balance at the moment but I want it to be devide to Quarters of the year...
    Regards

     
    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. Where is the code you already tried? Or are you so lazy, so rude or so privileged that you did not do anything for yourself? 
    In fact that silly “tbl-” prefix is so bad that it has a name! It is called Tibbling and Phil Factor even wrote a humor article on bad programmers that use it. 
    Your narrative is vague; it sounds like this is the DDL: 
    CREATE TABLE Incomes
    (payment_month CHAR(10) NOT NULL PRIMARY KEY,
     income_amt DECIMAL(12,2) NOT NULL
      CHECK (income_amt > 0.00),
    CREATE TABLE Expenses
    (payment_month CHAR(10) NOT NULL PRIMARY KEY,
     expense_amt DECIMAL(12,2) NOT NULL
      CHECK (expense_amt > 0.00),
    >> in each table I have column name "monthPayed" (have values of all the months of the year). <<
    I hope not! 2014 has not gotten to September, November or December yet! And the ISO-11179 data element name should be “payment_month”; but it is still wrong! An expense is not a payment! An income is not a payment! 
    >> I would like to create a balance view table that will show me the financial status for the Q1 (for example). <<
    Report Period Table
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Something_Report_Periods
    (something_report_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (something_report_name LIKE <pattern>),
     something_report_start_date DATE NOT NULL,
     something_report_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (something_report_start_date <= something_report_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    Now figure it out for yourself, show us what effort you put into this, then we will help you. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

Maybe you are looking for

  • Ipod Stuck in "boot Loop" and itunes says I'm not connected to the internet.

    Aright well I'm having a huge problem fixing my ipod.    Let's start at the beginning, i wanted to put new music onto my ipod but itunes wasn't detecting my ipod, it said i have to restore my ipod to factory settings, so i manually did it from the ip

  • Error while deploying BPM : DC bpm_0/bl/ddic does not contain any archives for deployment

    Hi All,         I'm using SAP PO 7.31 single stack. I've created a simple BPM in NWDS. I'm able to successfuly build the BPM which I created but when I "Deploy" it throws the below error. DC bpm_0/bl/caf/metadata does not contain any archives for dep

  • Export a portion of the video WITHOUT the audio

    Hi, I have tried many, many different methods (too many to list) for removing the audio from my mp4 file before exporting, but the flv file continues to have the audio.  Does anyone know of a sure way to get rid of it (yes - I have deleted it! and ha

  • Business Configuration Set

    Can anyone provide me details on Business Configuration Sets? What is its use in SAP FICO?  What is its significance? What points should be keep in mind while activating BCS

  • [SOLVED] wlan0 interface disappeared after installing compat

    Hello I was trying to fix the airmon-ng negative channel problem, and someone pointed me to "compat-wireless-patched", avail. in AUR, here: http://aur.archlinux.org/packages.php?ID=41472 I installed this, makepkg -i etc., and rebooted.. now my wlan0