Searching on KeyField composite key

I have a composite key with several KeyFields. I'm not allowed to create SecondaryKey on any KeyField (or better said, I've not found a way to do this). How would a search using the first KeyField? Are there examples? Thank you. Peter

Hi Peter,.

This thread answered your question? :

Re: Help definition index

No, there is no example of this.

-mark

Tags: Database

Similar Questions

  • How to update a record, if it is a composite key (primary key is based on two columns) in the OPS? page?

    Hello

    Actually I got to know this update of a record must be made when the primary key is based on two columns.

    Previously, I used SPEL for a column. It was working fine.

    But I came to know that regardless of the folder I try to update, it was the update page is coming up with the first combination of the record.

    As if RC 131

    RC 124

    RC 125 are the records.

    If I click on update of RC 124 also, the update page is coming up with RC 131 values as it is the first.

    So I understand that the SPEL should be based on two parameters, because it is a composite key.

    How to do?

    Please let me know if you don't understand the problem.

    Thank you.

    Wow!

    I got it.

    Thank you brothers, always a hope that you could help me

  • Index on the Composite key to solve enq: TM - contention

    Version: Oracle 10g

    Hello

    I had enq: TM - restraints in my database, and I want to apply the index on the foreign key of one of the table column.

    But I see there are composite foreign keys and foreign keys unique in the table.

    Only foreign key I can easily create the index, but my doubt is that, for a composite foreign key,.

    Do I need to create the composite indexes on each column of the composite key or composite foreign key columns, I have to apply clue to solve the enq: TM - restraints question.

    For example: I have a foreign key below

    "FK_RECONDATA_DRIVER" CONSTRAINT FOREIGN KEY ('NRT', 'DADDRESSTYPE', 'DADDRESSNR')
    REFERENCES 'COL '. "" TURN ON THE FAZGFUEHRER ' ('NRT', 'ANSCHTYP', 'ANSCHNR'),
    "FK_RECONDATA_PRODUCT' FOREIGN KEY ('NRT',"PRODUCTNR") CONSTRAINT
    REFERENCES 'COL '. "" ENABLE SORT "("FNR","SORTENNR")

    Here the column FNR is common in both the foreign key.

    Please help me find how to create indexes on these columns.

    An index defined as ind_fk (a, b, c, e, f) will cover (1) (a) FK and FK (a, b, c).

    It however will not cover FK(a,e,f) because it does not start by all the columns of the FK.

    You must create an additional index that begin with (a, e, f).

    Best regards

    Mohamed Houri

  • is it better to use the rowid function or a composite key

    I have a clue about 2 fields so that I can make my form based on these 2 fields
    But now since I spend my app in 4.2 that I intend to do everything depended of rowid function

    Is this the right approach
    I currently facing problems as 1422 extract extract several lines even if the primary key is defined as key composite column 2

    Your primary key must never rest on 'natural touches', that is to say the actual data in your table. The fact that you are talking about a composite key means that you think that do. You can create an index that is UNIQUE on these types of fields to maintain the integrity of the data, but they do not have the pharmacokinetics of the table.

    My primary keys are always a NUMERIC field, populated by a combination of sequence/relaxation. Because the data in the ID field have no connection with the data in the table - there is never any need/reason to change. As has been mentioned above, ROWID changes rarely, but it is possible for them. I use ROWID in the Apex and when I have forms to keep tiny (maybe 5-10 lines) lookup tables that are used to populate LOVs create a primary key is excessive.

  • Integrate Hibernate L2 cache with consistency in the composite key of reference

    Hi all:
    I have a problem when I activate the Hibernate l2 cache integrated with consistency. When the entity class using this string or unique integer primary key, the L2 cache has worked well. But when I use the entity with composite key class, I had the problem.
    I wrote a script to test junit to test the session.get method, when I run the test cases for the first time, the miss of the entity to load the object from the cache, Hibernate will trigger a DB query so it box as an object, then put it in the cache. But when I run the test case, again, I found the Hibernate trigger a query once again, which was strange... (it should not have happened, I should got the object from the cache), then, I used the console cache coherence to list the data in the cache and finding himself under the information:
    ###########################################
    (Hi) map: list
    model. SiteUserInfo #model. SiteUserID@323819 = Item {version = null, freshTimestamp = 1333943690484
    model. SiteUserInfo #model. SiteUserID@323819 = Item {version = null, freshTimestamp = 1333943600419
    ###########################################
    There are two keys with the same value cached... (I put already implemented method hashcode and equals to SiteUserID object). someone there has the same problem? Or L2 Hibernate with composite key can integrate with consistency?

    Rip off code SiteUserID
    #####################################
    @Override
    public boolean equals (Object obj) {}
    If (obj == this) {}
    Returns true;
    }
    If (!) () obj instanceof SiteUserID)) {}
    Returns false;
    }
    SiteUserID id = (SiteUserID) obj;
    return new EqualsBuilder () .append (sid, id.getSid ()) .append (name, id.getName ()) .isEquals ();
    }

    @Override
    public int hashCode() {}
    return new HashCodeBuilder () .append (sid) .append (name) .toHashCode ();
    }
    ###################################

    Hi John,.

    I think there may be another problem.

    Please reference:
    http://blackbeanbag.NET/WP/2010/06/06/coherence-key-HOWTO/
    For entry cache, partitioned cache is placed in backup card in binary form.
    The main objects of the same data must always be serialized in binary form even.

    Unfortunately, use Hibernate CacheKey is as key cache L2.
    And CacheKey is somewhat complex, some related attributes use TreeMap as their type.
    "Java gives no guarantee on the order in a hash table and serialization is dependent on the command."
    (reference http://stackoverflow.com/questions/9337126/how-can-oracle-coherence-get-fail-with-retrieved-key-object)

    So... you may need to modify the source code of some Hibernate, ex: replace the FastHashMap in TreeMap...
    I tried, it looks like work. I'll send you have modified source codes.

    Best regards
    Leon

  • CQL Join on the coherence of Cache with Composite key

    I have a coherence of Cache with a composite key, and I want to join a channel for the records that cache with a CQL processor. When I deploy the package that contains the processor, I get the following error:

    + italics14:32:35, 938. modify the beginning of query SimpleQuery | [ACTIVE] ExecuteThread: '7' for the queue: "weblogic.kernel.Default (self-adjusting) | CQLServer | FATAL +.
    + 14:32:35, 938. change query > > SimpleQuery < < start +.
    + specified predicate requires a comprehensive analysis of the external source that is not supported. Please change the join predicate. [ACTIVE] ExecuteThread: '7' for the queue: "weblogic.kernel.Default (self-adjusting) | CQLServer | FATAL +.

    I think I use the key. If I change the key to a single field, it is OK. I found a similar problem when I defined a Java class to represent the composite key. It is possible to join this way on a composite key cache?

    I could define another area that is the concatenation of fields in the composite key, but it's a little messy.

    My config is as below:

    < wlevs: caching system id = "MyCache" provider = 'coherence' / >

    < wlevs:event - type-repository >
    < wlevs:event - type the type name = "SimpleEvent" >
    < wlevs:properties >
    < name wlevs:property = 'field1' type = "char" / >
    < name wlevs:property = 'Field2' type = "char" / >
    < / wlevs:properties >
    < / wlevs:event - type >
    < / wlevs:event - type-repository >

    < wlevs: channel id = "InChannel" - type of event = "SimpleEvent" >
    < wlevs:listener ref = "SimpleProcessor" / >
    < / wlevs: channel >

    < wlevs:processor id = "SimpleProcessor" >
    < wlevs:listener ref = "OutChannel" / >
    < wlevs:cache - Ref source = "SimpleCache" / >
    < / wlevs:processor >

    < wlevs: channel id = "OutChannel" - type of event = "SimpleEvent" >
    < / wlevs: channel >

    < wlevs:cache id = value 'SimpleCache"type ="SimpleEvent.
    Properties-key = "Field1, Field2.
    system caching = "MyCache" >
    < / wlevs:cache >

    and the processor CQL is as follows:

    < processor >
    < name > SimpleProcessor < / name >
    < rules >
    < request id = "SimpleQuery" >
    <! [CDATA]
    Select I.field1, I.field2 from InChannel [now] as I,
    SimpleCache as S where
    I.Field1 = S.field1 and
    I.Field2 = S.field2
    []] > < / query >
    < / rules >
    < / processor >

    Thank you
    Mike

    Unfortunately, join him on composite keys in coherence is not supported in the released versions. He will be supported in release 12g.

    As you mention, setting another field as the key, which is the concatenation of the original keys is the workaround.

  • Composite key mapping.

    I have the table that has a composite key as the primary key. (I'm creating entity of the editor. Base_de_donnees contains several tables, where the list tables are not displayed in the data model editor)

    When creating entity I have traced the two field (which are primary keys of database) as fields Id (OrderNumber and number)

    After the model on the deployment server and running code, I get no result.

    Also, no error message appears on the console of the server of LCD screens.

    Composite key can be used in data modeling. If so, what is a good way to set up the composite key.

    I use screens LCD 3.1 and latest version of the plugin for Flash Builder 4

    < entity name='LineItemBean' persistent='true'>

                < annotation name="VisualModeler" width="239" height="123" x="293" y="51"/>

    <annotation ='ServerProperties' from the name of ServerType='LCD'/ >

                < annotation name="DMS" Table="ADVJPMT. Of the ELEMENTS' using transactions='false'/ >

    <annotation name='ActionScriptGeneration' package='valueObjects' ImplicitServicePackage='services'/ >

                < id name="orderNumber" type="integer" generated="false">

                      < annotation name="DMS" ColumnName="ORDER_NUMBER"/>

                </ id >

                < id name="itemNumber" type="integer" generated="false">

    <annotation ='DMS' from the name of ColumnName='ITEM_NUMBER'/ >

    <annotation name='ActionScriptGeneration' DisableAutoReCalc='true'/ >

                </ id >

                < property name="quantity" type="integer">

                      < annotation name="DMS" ColumnName="QUANTITY"/>

    <annotation name='ActionScriptGeneration' DisableAutoReCalc='true'/ >

                </ property >

          </ entity >

    Hi Amit,

    This use case must certainly work, and I don't see anything bad in your model as it is. Can you give some more information about what exactly are you trying to run? You run LineItemBeanService.getAll ()? It is the simplest filling/filter, you can try to see if the template has been correctly configured.

    To see what can go wrong, you can try a few things:

    1. enable debug logging. Open services - config.xml in the directory WEB-INF/flex to your LCDS webapp. At the bottom of the file, find the logging-> target and replace the level attribute 'Debug '.

    2. try to get the data from the table of the ELEMENTS with a direct SQL query ("" Select * elements "") in the viewer request RDS (point of view of data model, RDS Dataview)

    See if you directly to the database running the query gives the expected result and if so, check the server logs to see what happens when the server receives the request count with all.

    _______________

    That said, the LineItemBean entity in your model that makes me think you may also have an OrderBean and an ItemBean entity in your model. I'm guessing an order consists of a few command elements, each with a certain amount, and a given element can appear on many orders. If this is the case, you should consider these data modeling with the associations between the entity of LineItemBean and the OrderBean and ItemBean entities. This would mean that the ORDER_NUMBER and ITEM_NUMBER columns in your table will be the primary keys and foreign keys, and your model will look like this:

    Give it a try, if that seems reasonable (I just guess on your case of use here)

    Thank you

    Svetlin

  • How to disable the "quick search", which turns the key ' / '?

    When I use google calculator and want to divide something pressing on ' / ', the 'quick search' bar appears immediately, preventing me from work with a calculator away.
    Help me please. It's very annoying.

    Type Subject: config in the address bar (address) and press the enter key to open the topic: config as you open a Web site by typing the URL in the address bar of the page.

    • If you see a warning message, so you can confirm that you want to access the comments: config page.

    See:

    • Use the top search bar of the about: config page easier to locate preferences
    • preferences that have been changed and do not have the default display in bold (user set)
    • preferences that are user defined ("BOLD") can be reset to the default value using the context menu
    • preferences can be changed via Edit (string or integer) or turn (Boolean) in the context menu and by double clicking on the line with the pref
    • preferences can be created via the context menu: new-> String, Integer, Boolean
  • composite key

    Hello

    can I understand a foreign key column to define a composite primary key?
    for example, Department number is a foreign key in the employee table, then I set number of Department and employee as the primary key of the employee table number?

    concerning

    I guess that's still just a sample of what is stored.
    What is the column 'NO '?

    Because a value 'NO' can refer to several 'Boreholenumbers' and a Boreholenumber can refer to several 'NO', you have a number to-several. This should be divided into a 1 to many, and many-to-1 relationship.

    Suppose that 'NO' refers to a boring project number (' excuse the pun) because you have not detailed there.

    I would expect tables like that...

    Table: Boring_Project (BP_NO number, project name varchar2 (30)...)
    Data for example:

    BP_NO Project_Name       ... etc.
    ----- ------------------
    1     Drill for Oil
    2     Dig for Coal
    3     Clangers Moon Dust
    

    Table: Drilling (BH_NO varchar2 (10), Borehole_Name varchar2 (30)...)
    Data for example:

    BH_NO Borehole_Name      ... etc.
    ----- ------------------
    BH1   Borehole 1
    BH2   Borehole 2
    

    Table: Project_Borehole (PBH_NO number, BP_NO number, BH_NO varchar2 (10), varchar2 (10) Field1, Field2 varchar2 (10))
    Data for example:

    PBH_NO BP_NO BH_NO field1 field2
    ------ ----- ----- ------ ------
    1      1     BH1   xyz    pqr
    2      2     BH1   abc    mno
    3      3     BH1   prq    jjq
    4      1     BH2   aqr    xms
    5      2     BH2   xms    nds
    

    So now we have a relationship 1:M between the Boring_Project and Project_Borehole tables.
    We also have a relationship 1:M between drilling and Project_Borehole tables.

    Boring_Project ----- 1:M ----- Project_Borehole ----- M:1 ----- Boreholes
    

    Essentially, this gives you your number to-several between the tables Boring_Project and drilling.
    The Project_Boreholes has its own unique primary key and the BP_NO ('NO' in your case) and BH_NO ('Boreholenumbers' in your case) are two foreign keys.
    Data from the field is linked to a specific combination of 'NO' and 'Boreholenumber' is then that join at the table, but none of these numbers should be the primary key, they should be related to their tables foreign keys "parent". The junction table has its own unique key for every relationship that develops between parents.

    Does that make more sense?

  • Problem of composite key chain BigDecimal, pair

    JDeveloper 12.1.3

    I have OS based on a table that has the following PK

    Task_Id NUMBER

    Id_ressource Varchar2 (6)

    Using the EO above, I have a VO to view data in the user interface. I get the problem in the bean to support (test code below)

                DCBindingContainer dcbindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                DCIteratorBinding iterator = dcbindings.findIteratorBinding("TaskCalendarIterator");
                System.out.println(activity.getProvider().getId());
                //Key key = new Key(new Object[] { activity.getId(),activity.getProvider().getId() });
                java.math.BigDecimal key1= new BigDecimal(140080);
                String key2="ds1";
                Key key = new Key(new Object[] { key1,key2 });
                System.out.println(activity.getId());
                System.out.println(key);
                RowSetIterator rsi = iterator.getRowSetIterator();
                Row row = rsi.findByKey(key, 1)[0]; //!!!!!!!!!!!!!!!!!!!!!!!!!!!! Here is where exception is thrown
                rsi.setCurrentRow(row);
    

    Caused by: oracle.jbo.domain.DataCreationException: Houston-25009: failed to create an object of type: java.math.BigDecimal type: java.lang.String with value: ds1

    Recording with the key 140080, ds1 exists in the iterator.

    I thought that the key can be anything, including channels?

    OK, I got the problem solved. The order of the key attributes must be identical to the order of these attributes in the original Version, NOT in OT

    The order was therefore, in my case in OT, TaskId, ResourceId

    Vo to ResourceId, TaskId

    That's why in the bean to support code, it must be:

    java.math.BigDecimal key1= new BigDecimal(140080);  //This is TaskId
    String key2="ds1";  //This is ResourceId
    Key key = new Key(new Object[] { key2,key1 });
    
  • Creating aliens/Composite keys (referenced)

    Hello. I have tried to figure this out for a few hours now and thought I'd try posting on a forum before going to bed I now want to rip my hair as I just can't understand it!

    Although it will take the masses of space Im going to provide my DB SET here, so that nothing is left out...

    Here it is:


    CREATE TABLE 'COURSES '.
    (NUMBER OF 'COURSE_NO',
    "COURSE_NAME' VARCHAR (30),
    DATE OF THE "COURSE_START_DATE."
    DATE OF THE "COURSE_END_DATE."
    'TOTAL_UNITS' SMALLINT,
    'COURSE_COORDINATOR_STAFF_NO' SMALLINT,
    'TOTAL_COURSE_COST' SMALLINT,
    'THIRD_PARTY_SUPPLIER_NO' SMALLINT,
    PRIMARY KEY ('COURSE_NO') 'COURSE_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'ASSESMENT_TYPE '.
    (VARCHAR (15) 'ASSESMENT_TYPE',)
    VARCHAR (70) "ASSESMENT_DESCRIPTION."
    PRIMARY KEY ('ASSESMENT_TYPE') 'ASSESMENT_TYPE_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'COURSE_OUTCOME '.
    ('COURSE_OUTCOME' VARCHAR (5),)
    VARCHAR (25) "COURSE_OUTCOME_DESCRIPTION."
    PRIMARY KEY ('COURSE_OUTCOME') 'COURSE_OUTCOME_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'DEPARTMENT '.
    ("DEPARTMENT_NO' SMALLINT,
    'DEPARTMENT_NAME' VARCHAR (50),
    VARCHAR (150) "DEPARTMENT_LOCATION."
    ACTIVATE THE 'DEPT_MANAGER_NO' SMALLINT NOT NULL,
    CONSTRAINT PRIMARY KEY ('DEPARTMENT_NO") ENABLE 'DEPARTMENT_PK');

    CREATE TABLE 'EDUCATIONAL_INSTITUTION '.
    (VARCHAR (100) 'SCHOOL_UNIVERSITY_NAME',)
    VARCHAR (200) "SCHOOL_UNIVERSITY_ADDRESS."
    PRIMARY KEY ('SCHOOL_UNIVERSITY_NAME') 'EDUCATIONAL_INSTITUTION_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'EMPLOYEE '.
    ("EMPLOYEE_NO' SMALLINT,
    "EMPLOYEE_NAME' VARCHAR (50),
    VARCHAR (150) "EMPLOYEE_ADDRESS."
    'JOB_DESCRIPTION' VARCHAR (50),
    'STATUS' VARCHAR (15).
    'START_DATE' DATE,
    'SALARY_CODE' SMALLINT,
    'SUPERVISOR_EMPLOYEE_NO' SMALLINT,
    "DEPARTMENT_NO' SMALLINT,
    PRIMARY KEY ('EMPLOYEE_NO') 'EMPLOYEE_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'EMPLOYEE_COURSE_OUTCOME '.
    ("EMPLOYEE_NO' SMALLINT,
    'COURSE_NO' SMALLINT,
    'COURSE_OUTCOME_CODE' VARCHAR (5),
    'COURSE_EMPLOYEE_MARK' SMALLINT,
    CONSTRAINT PRIMARY KEY ('EMPLOYEE_NO', 'COURSE_NO') ENABLE 'EMPLOYEE_COURSE_OUTCOME_PK');

    CREATE TABLE 'EMPLOYEE_COURSE_UNIT_OUTCOME '.
    ("EMPLOYEE_NO' SMALLINT,
    'COURSE_NO' SMALLINT,
    'UNIT_NO' SMALLINT,
    'UNIT_OUTCOME_CODE' VARCHAR (5),
    'EMPLOYEE_UNIT_MARK' SMALLINT,
    CONSTRAINT PRIMARY KEY ('EMPLOYEE_NO', 'COURSE_NO') ENABLE 'EMPLOYEE_UNITOUTCOME_PK');

    CREATE TABLE 'EMPLOYEE_CRS_UNIT_ASSESMENT '.
    ("EMPLOYEE_NO' SMALLINT,
    'COURSE_NO' SMALLINT,
    'UNIT_NO' SMALLINT,
    VARCHAR (15) "ASSESMENT_TYPE."
    'EMPLOYEE_ASSESMENT_MARK' SMALLINT,
    CONSTRAINT PRIMARY KEY ('EMPLOYEE_NO', 'COURSE_NO') ENABLE 'EMPLOYEE_CRS_UNIT_ASSESMENT_PK');

    CREATE TABLE 'EMPLOYEE_QUALIFICATION '.
    ("EMPLOYEE_NO' SMALLINT,
    'QUALIFICATION_TYPE' VARCHAR (5),
    'SUBJECT' VARCHAR (20),
    "GRADE" SMALLINT,
    VARCHAR (100) "SCHOOL_UNIVERSITY_NAME."
    'AWARDING_BODY' VARCHAR (50),
    'DATE_QUALIFICATION_OBTAINED' SMALLINT,
    CONSTRAINT PRIMARY KEY ('EMPLOYEE_NO', 'QUALIFICATION_TYPE') ENABLE 'EMPLOYEE_QUALIFICATION_PK');

    CREATE TABLE 'QUALIFICATION_TYPE '.
    ('QUALIFICATION_TYPE' VARCHAR (5),)
    VARCHAR (25) "QUALIFICATION_DESCRIPTION."
    PRIMARY KEY ('QUALIFICATION_TYPE') 'QUALIFICATION_TYPE_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'WAGES. "
    ("SALARY_CODE' SMALLINT,
    'SALARY_AMOUNT' SMALLINT,
    PRIMARY KEY ('SALARY_CODE') 'SALARY_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'THIRD_PARTY_SUPPLIER '.
    ("THIRD_PARTY_SUPPLIER_NO' SMALLINT,
    VARCHAR (100) "THIRD_PARTY_NAME."
    VARCHAR (100) "THIRD_PARTY_CONTACT_NAME."
    PRIMARY KEY ('THIRD_PARTY_SUPPLIER_NO') 'THIRD_PARTY_SUPPLIER_PK' ENABLE CONSTRAINT);

    CREATE TABLE "UNIT".
    ("UNIT_NO' SMALLINT,
    "UNIT_NAME" VARCHAR (30),
    DECIMAL (7.2) "UNIT_COST"
    PRIMARY KEY ('UNIT_NO') 'UNIT_PK' ENABLE CONSTRAINT);

    CREATE TABLE 'UNIT_OUTCOME '.
    ('UNIT_OUTCOME_CODE' VARCHAR (5),)
    VARCHAR (25) "UNIT_OUTCOME_DESCRIPTION."
    PRIMARY KEY ('UNIT_OUTCOME_CODE') 'UNIT_OUTCOME_PK' ENABLE CONSTRAINT);


    While everything worked fine after that I stuck that in SQL * Plus Command line...

    Published by: Ollie_Marriott on April 12, 2011 07:32

    Ollie_Marriott wrote:
    So ive either an hour past and written some absolute crap, or Ive got it right... (In which case ill out spray glue and begin to glue the hair to my head!)


    DOES STILL MAKE SENSE?

    Without knowing exactly what you are trying to reach and without uttering an ERD to your drawing, it is difficult to say with certainty, but nothing obviously looks weird. I don't know why you are doing this:

    CREATE TABLE "EMPLOYEE_COURSE_UNIT_OUTCOME" (
       "EMPLOYEE_NO" SMALLINT,
       "COURSE_NO" SMALLINT,
       "UNIT_NO" SMALLINT,
       "UNIT_OUTCOME_CODE" VARCHAR(5),
       "EMPLOYEE_UNIT_MARK" SMALLINT,
       CONSTRAINT "EMPLOYEE_UNITOUTCOME_PK"
          PRIMARY KEY ("EMPLOYEE_NO", "COURSE_NO") ENABLE);
    

    Then later proceed as follows:

    ALTER TABLE EMPLOYEE_COURSE_UNIT_OUTCOME DROP PRIMARY KEY;
    
    ALTER TABLE EMPLOYEE_COURSE_UNIT_OUTCOME
       ADD CONSTRAINT EMCrsOut_PK
       PRIMARY KEY (Employee_No, Course_No, Unit_No);
    

    If you want the three columns of the pharmacokinetics, then put the three columns in the create table statement.

    Assuming that your work is actually done on an Oracle database, and then a few other comments. In general, it is not a good idea in Oracle to use (double) city of identifiers. When you create an object by using quoted identifiers, it becomes potentially sensitive case. By default, Oracle stores the object in uppercase letters names in the data dictionary and transform an identifier without quotes uppercase before looking in the data dictionary. Although all identifiers in double quotes appear to be capital letters, a slight typo in your creation scripts could cuase hours of frustration in the future. Take into account:

    SQL> CREATE TABLE "MY_tEST_TAB" (
      2     "ID" NUMBER,
      3     "DESCr" VARCHAR2(10));
    
    Table created.
    
    SQL> desc my_test_tab
    ERROR:
    ORA-04043: object my_test_tab does not exist
    
    SQL> desc "MY_tEST_TAB"
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ID                                                 NUMBER
     DESCr                                              VARCHAR2(10)
    

    compared to

    SQL> drop TABLE "MY_tEST_TAB" purge;
    
    Table dropped.
    
    SQL> CREATE TABLE my_test_tab (
      2     id NUMBER,
      3     descr VARCHAR2(10));
    
    Table created.
    
    SQL> desc my_test_tab
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ID                                                 NUMBER
     DESCR                                              VARCHAR2(10)
    
    SQL> desc MY_tEST_TAB
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ID                                                 NUMBER
     DESCR                                              VARCHAR2(10)
    

    Your data types seem to be that the base SQL Server, that's why I said assuming that Oracle above. In Oracle, the correct data type for a variable-length string is a VARCHAR2, not a varchar. Currently, these are the same, but Oracle has always said that the semantics of varchar may change.

    Smallint is a type of data accepted in Oracle, but it translates into Number (38) in Oracle. Similarly, your definition of decimal (7, 2) is translated to a NUMBER (7.2) in Oracle.

    Of course, if your work is actually in SQL server, then ignore the last half of this and find the SQL Server on MSDN forums :-) Oracle and SQL Server behave very differently, and what works well in Oracle may not in SQL server (and vice versa), so all of the advice you get here for a SQL Server problem may or may not be valid.

    John

  • TOC problem; search boxes and lost key words

    I inherited a Robohelp X 5 project that was originally started by someone very familiar with these types of programs, then finally ruined by someone who knew nothing about them or the content. I spent most of my time to rewrite and update content using X 5, then upgraded to 7 this morning. I learned a little about the program, not obviously not enough. I am sure that these are things that I screwed up, because they worked before; but I don't know what I did or how to fix it...
    First, the table of contents are built, with books and the pages are in the order I want. Books are likely linked to a page-, so that when a user clicks on the book, it is by default a particular page, and from there they can move to other pages in the section. However, when I check the results, you must click on the book, then click on the individual page for the page to open.
    Then I "lost" the search for the Index fields and keyword search. When I look at the skin, they appear, but when I discovered the project, they aren't - lists index and keyword appear in the place the boxes.
    If anyone can give me any advice on what I should do, I would really appreciate it.

    Hello

    If you click on file > generate a main page layout, you should see the first of a few dialog boxes different you can interact with. Dialog boxes that all the different parameters of order for the creation of the WebHelp. That's what Peter was referring to his post. One of the options govern the operation of the WebHelp Navigation. Your choice is between an Applet Java and DHTML. It seems that if your configuration is either using "Pure HTML" option or you have activated the option "Section 508".

    Does that make more sense?

    See you soon... Rick

  • Drilled down by using a composite key of level

    Hi, I'm new with OBIEE, I have this Dimension table:

    ORDERS (client_name, customer_surname, order_key, customer_city)

    I want to build a dimension with 3 levels, from the root to the leaf: CUST_CITY-> CUST_NAME-> ORDER_KEY
    When the column answers CUST_NAME I want to use for exploration down consist of name + surname, which are the 2 separate logical columns... is it possible? How could I do?

    any suggestion will be appreciated, thanks!

    In the logical layer of the repository, right-click in the table and choose new object > logical column, at the opening of dialog enter a name for the column, then look down the left side, there is a checkbox with the label 'Use logical columns as source', the text box below it will become white , now on the right hand side, click the elipsis (the one with three dots) button to open the expression builder, to the left of the three downstairs, click logical Tables to lay out your tables and columns. Now you can add them by selecting them and clicking the Insert button, just type a double character pipe between two columns to concatenate the.

    Ed

  • A composite primary key with two KeyField: a rope and a sequential int.

    Hi all

    According to [url http://download.oracle.com/docs/cd/E17277_02/html/java/com/sleepycat/persist/model/PrimaryKey.html#sequence ()] sequence JavaDoc: a composite key class can also be used to substitute the sort order, but it can contain only a single key field which has one of the types mentioned previously.

    We strive to create a composite PK as follows:
    @Persistent
    public class ExamplePK {
        @KeyField(1) Integer seq;
        @KeyField(2) String admon;
    
        public String getAdmon() {
            return admon;
        }
    
        public void setAdmon(final String admon) {
            this.admon = admon;
        }
          public Integer getSeq() {
          return seq;
        }
          public void setSeq(final Integer seq) {
          this.seq = seq;
        }
    }
    
    @Entity
    public class ExamplePojo {
    
        // Relational fields
        @PrimaryKey(sequence="ExampleSeq")
        private ExamplePK idExample;
    
        public ExamplePK getIdExample() {
            return idExample;
        }
    
        public void setIdExample(final ExamplePK idExample) {
            this.idExample = idExample;
        }
    }
    but we get the following exception:
    java.lang.IllegalArgumentException:A composite key class used with a sequence may contain only a single integer key field: es.correos.ape.dao.notification.pojo.ExamplePK[Server1:1291138230743]
          at com.sleepycat.persist.impl.CompositeKeyFormat.getSequenceKeyFormat(CompositeKeyFormat.java:292)
          at com.sleepycat.persist.impl.PersistKeyAssigner.<init>(PersistKeyAssigner.java:39)
          at com.sleepycat.persist.impl.Store.getPrimaryIndex(Store.java:337)
          at com.sleepycat.persist.EntityStore.getPrimaryIndex(EntityStore.java:307)
    What we're doing wrong?

    ARO
    / Caesar.

    Caesar, I think that the wording of the javadoc and exception message is incorrect or at least confused, and I answer key for a future version.

    -mark

  • identification of composite primary keys

    Hi mates,

    I am trying to identify a unique value in a particular table, so then I tried to look for the primary key of the table constraints:

    11:54:07 brunos@vvp > select constraint_name, constraint_type, index_name, owner of dba_constraints where table_name = 'CARD_TRANSACTIONS ';

    OWNER CONSTRAINT_NAME, CONSTRAINT_TYPE INDEX_NAME
    ------------------------------ ------------------------------ --------------- ------------------------------
    VVP PK_CARD_TRANSACTIONS P PK_CARD_TRANSACTIONS


    Then I looked at dba_cons_columns:

    11:56:22 brunos@vvp > select * from dba_cons_columns where constraint_name = "PK_CARD_TRANSACTIONS";

    OWNER CONSTRAINT_NAME TABLE_NAME COLUMN_NAME POSITION
    ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------
    VVP PK_CARD_TRANSACTIONS CARD_TRANSACTIONS CARD 4
    VVP PK_CARD_TRANSACTIONS CARD_TRANSACTIONS METER 3
    VVP PK_CARD_TRANSACTIONS CARD_TRANSACTIONS 2 OPERATION
    VVP PK_CARD_TRANSACTIONS CARD_TRANSACTIONS STATE 1



    I understand that in a single table, we have only 1 PK only. It is a composite primary key? I expected to see 1 single value, and then he showed me 4.


    Thanks in advance.

    Published by: BSalesRashid on 06/29/2012 07:58

    It is a Composite key, you can see the column in position to observe order in the Composite key.

    Rgds,

    Ahmer

    Published by: Ahmer Mansoor on June 29, 2012 20:02

Maybe you are looking for