More than One Primary Key

Hi,
How to create more than one primary key in TT
CREATE TABLE LOOKUP (KEY NUMBER NOT NULL PRIMARY KEY, VALUE CHAR (64))
In Oracle we can create Composite Primary key
CREATE TABLE LOOKUP (KEY NUMBER NOT NULL , VALUE CHAR (64) , CONSTRAINT constraint_name PRIMARY KEY (KEY,VALUE) )
Thanks!

Hi 933663,
What is a problem?
Command> CREATE TABLE recreation.members
(membername CHAR(20) NOT NULL,
  club CHAR(15) NOT NULL,
  memberphone SMALLINT,
  PRIMARY KEY (membername, club));
Command> regards,
Gennady

Similar Messages

  • Can I have more than one primary key ???????

    Hi
    Assuming an application has designed as CMP with findByPrimaryKey( ) method having more than one parameter.
    Example :- findByPrimarykey(String val1, String val2)
    Is it possible to have two parameters fot the finder methods instead using PrimaryKey class ?
    If yes, what are the changes required for following deployment descriptor element. ?
    1. <prim-key-class></prim-key-class>
    2. <primkey-field></primkey-field>
    Regards
    Edward.I

    If a primary key has more than one primary key fields; is a composite primary key, a primary key class is required.
    The parameter of the findByPrimaryKey() method is the primary key class.
    findByPrimaryKey(PrimaryKeyClass pkClass)
    Deepak

  • VLD-0201:Table has more than one primary key

    hi
    i'm working with OWB 9.2,I was imported the table from database,when i validating that it is giving message:
    VLD-0201:Table has more than one primary key
    vld-0209:Duplicate unique key i.e:cust_acc and SYS_C00435 detected.
    Can i use this table and generate the mapping with out any errors?
    Any help will be very generate.

    Hi Ashok,
    I'm quite curious how you managed to get a table with 2 PK's.
    I tried it myself:
    =======================================================
    SQL>create table x(c1 number constraint pk1 primary key,c2 number constraint pk2 primary key, c3 date);
    create table x(c1 number constraint pk1 primary key,c2 number constraint pk2 primary key, c3 date)
    ERROR at line 1:
    ORA-02260: table can have only one primary key
    SQL>ed
    Wrote file afiedt.buf
    1* create table x(c1 number constraint uk1 unique,c2 number constraint uk2 unique, c3 date)
    SQL>/
    Table created.
    =====================================================
    As you can see, trying to create a table with more than 1 PK is impossible. With Unique Key, that IS possible (see second example).
    I don't expect mappings to function properly with such an error message.
    Is it possible for you to drop the table in the database, correct the definition of the table in OWB and then deploy that corrected version to the database?
    If on the other hand the table on the database is correct (i.e. has only one PK) then the import into OWB obviously did not go well and I'd suggest you drop the imported definition and try to import it again.
    Cheers, Patrick

  • Can we have more than one primary key constraint to a Oracle Table?

    Hi,
    Can we have more than one primary keys to a single table in oracle? ( Not the composite key)
    Please somebody answer..
    Regards,
    Alaka

    811935 wrote:
    Can we have more than one primary keys to a single table in oracle? ( Not the composite key)
    In principle a table can have multiple keys if you need them. It is a very strong convention that just one of those keys is designated to be "primary" but that's just a convention and it doesn't stop you implementing other keys as well.
    Oracle provides two uniqueness constraints for creating keys: the PRIMARY KEY constraint and the UNIQUE constraint. The PRIMARY KEY constraint can only be used once per table whereas the UNIQUE constraint can be used multiple times. Other than that the PRIMARY KEY and UNIQUE constraints serve the same function (always assuming the column(s) they are applied to are NOT NULL).

  • More then one Primary Key?

    During application building there is only a place to specify 2 primary keys. If I want to use more then 2 where would I do this at? Thanks Agains!!

    Not possible if you are using the Automatic Row Fetch and Processing DML.
    One workaround is to define a view, but that will have a drawback if you wish to use the returning clause (i.e. "Return Key Into Item" under Automatic Row Processing). This is because Oracle SQL does not support the returning clause with views.
    You have to develop the PL/SQL code to accomodate the custom table configuration with more than two primary keys.
    Regards,
    John

  • Hacking application id equals() to allow more than one row per "primary key"

    I have a read only entity whose primary key is not the real primary key
    on the underlying table. The result is that I get more than one row per
    "primary key". This is what I want. However KODO will not allow me do
    it, because I am storing the collection in a HashSet() and the equals()
    method on the application id object ensures that this set contains no
    duplicates (as defined by the application id). At least thats how it
    seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

    The "primary key" I am using it already a compound key of two columns.
    The real key on the underlying table is a three column key. But the
    problem is that the table represents two different application level
    entities. I could deal with it when I was hand-writing SQL (I could do
    a distinct for example) but now I am relying on foreign key
    relationships since I moved to JDO. Not sure what to do. Best solution
    is to rework the table, but there is a lot of legacy code (that other
    teams use and maintain) relying on this table. I guess I'll use the
    weekend for inspiration ;-)
    Steve Kim wrote:
    This sounds like a dangerous operation. Even if this works now, I
    cannot promise future compatibility... and in fact may result in bad
    data (for example in caching both at the PM and PMF level) Is there no
    other field that you can reference as part of the primary key? Primary
    Keys can be multi columned (e.g. last_name, soc_sec_number)
    Mike Hogan wrote:
    I have a read only entity whose primary key is not the real primary
    key on the underlying table. The result is that I get more than one
    row per "primary key". This is what I want. However KODO will not
    allow me do it, because I am storing the collection in a HashSet() and
    the equals() method on the application id object ensures that this set
    contains no duplicates (as defined by the application id). At least
    thats how it seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

  • One Key FIgure in more than one column with different restrictions

    Hi,
      I am using a key figure in more than one column with different restrictions, but restriction in one column is affecting the result in other column. What shall i do to make it independent from one another??

    Hi Pravender Chauhan,
        If you want in Single column different value for different Rows based on same Key Figure, you can create Structure where you can define different logic for each row but using same key figure.
    If you want to use different Key figures then you should have to Restricted Key Figure and for any calculation you can use calculated Key figure.
    Assign points if Useful.
    Regards,
    Rajdeep.

  • Can I use a single QuickTime Pro key on more than one computer?

    I would like to use QuickTime Pro at both home (Windows Vista) and at work (Windows XP). Can I do this using a single purchased key, or do I need to buy two separate keys, one for each machine?
    It's a rather stupid question, but I can't find an straightforward statement one way or the other in the FAQs. Perhaps the answer's too obvious!
    Cheers,
    Andrew.

    Thanks! I thought this would probably be the case, but since iTunes allows me to authorise more than one machine, I thought that it was just possible that QuickTime might do the same. Back to the drawing board ...
    Cheers,
    Andrew.

  • I am unable to to upload more than one photo at a time. I have tried to hold down the shift key

    I am unable to upload more than one photo.  I have tried to hold down the shift key and highlighting the remaining photos. 

    If you are using the Internet Explorer (IE) browser than you will only be able to upload one file at a time. This is per browser design by Microsoft. If you want to upload multiple files than use another browser such as Firefox or Chrome.
    If you are not using IE and are seeing this issue then please share which OS version and browser version you are using.

  • Is there a way of setting up one more than one export preset to a funcion key?

    Hi
    is there a way of setting up Lightroom to export images in using more than one export preset at one time? When I have edited my photos I very often want to create a full res JPEG to upload to Zenfolio with no watermark, a medium res JPEG to go to Flickr and a 1500px image with a watermark for Facebook (I normally upload these last). I'm hoping Lightroom would also have a an option to set Function keys to trigger export presets for example.
    I'd like to be able to stack export presets to help with my workflow.
    Thanks
    Jon

    robcole.com - ExportManager
    does what you want, as long as you don't need post-process actions in your export preset(s).
    plugin | free | I wrote it..

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • More than one key in a Characteristic

    Hi there,
    I was wondering if it was possible to have more than one key in a characteristic?
    I have one with the main key, but then two more, and the text for the characteristic is dependent on all of these. At the moment when i run the DTP to the text table it is erroring as two of the keys are missed out and in some cases the main key has more than one text value.
    Does anybody know if this is possible, or a way to solve this?
    Cheers
    Alice

    Hi,
    well not quite sure about your issue. But normally additional key fields for a characteristic are maintained doing a compounding of the characteristic to at least one other characteristic. You can do that in the infoobject maintenance on the tab compounding.
    regards
    Siggi

  • Can you install logic pro onto more than one computer with the same cd key?

    can you install logic pro onto more than one computer with the same cd key?

    Only a desktop and a laptop, both of which must be Macs you own.
    (60296)

  • Assigning more than one G/L account to transaction key WRX

    Can any one tell me where we can create General Modification keys in  MM-FI integration
    As i need to assign more than one GL account for transaction key WRX (GR-IR)Clearing account.
    There may be one valuation grouping code with different General modifications thereby we can assign more than one G/L account to WRX transaction key.
    Example:
    Valuation grouping code or valuation modification = IN
    General Modifications: I01,I02,I03,I04..
    General Ledger Accounts: 240940000,240940001,240940002,240940003
    IN I01 240940000
    IN I02 240940001
    IN I03 240940002
    IN I04 240940003
    But , I am unable to find, where we can define these general modifications ( I01,I02,I03)....
    If any one knew please let me know...
    Ramesh B

    Hi
    Tcode: obyc, double clickon WRX event key, slect Rules ....you can find General Modification option>
    REgards
    ss
    Assing the points if useful

  • Key Out More Than One Colour

    Hi
    I wondred if there was any way of keying out more than one colour in FCP 5.
    Thanks...

    You can use the shift key to add a secondary color, and/or you can add another keyer to add more colors...
    Jerry

Maybe you are looking for

  • Urgent: Regarding Sending Email Notifications

    Hi all, We have scenario in which we have to search those users who has not accessed their accounts from last 2 years and then send them an email notification and after one month of notificatio we have to search those users who have been notified but

  • Checking if header in a Word document has focus or not.

    Hello, I am working on a document which has header and footer. Now the header can be modified by double clicking. I need a VBA code which can check if some one double clicks on the header and footer. Thanks in advance. Cheers Anshul

  • How to redeem a gift card?

    I have a gift card I'd love to use, but I can't for the life of me figure out where to go to redeem it. The store wants to automatically put it on my credit card, which is not what I want. I can find no options for entering a gift card at all. Help?

  • Can I import movies from ...

    Good Morning, I was wondering if someone could help me pls. I have a sony camcorder and I made some movies of a trip and stuff. I just got a new Ipod video 30gb and I would like to know if it possible to import the movies from the camcorder to the ip

  • Torrents not Working?

    Hello, It seems that after installing Snow Leopard, Vuze (formerly Azereus) has stopped functioning.I DO NOT USE TORRENTS FOR ILLEGAL ACTIVITIES, and I use the Vuze HD Network, which cannot download stuff anymore. Vuze also gives an error while openi