Need to populate unique key based on the combintion of rows

Hi
I have one table like this below.
ID PUB_DATE PUB_NAME PP SECTION PAGE_No
20080225 TR 1AB L 004
20080225 TR 1AB L 004
20080225 HN 1AB L 002
20080225 HN 1AB L 002
20080225 WW 1p1 L 001
20080225 WW 1p1 L 001
I need to populate unique id for ID column based on the combination of rows.
Exampl:
We know that first two records are same, then i will populate ID as 1 for these two records. Then next two records are same , then i will populate ID as 2 for these two records.
I need to populate ID as follows.
ID PUB_DATE PUB_NAME PP SECTION PAGE_No
1 20080225 TR 1AB L 004
1 20080225 TR 1AB L 004
2 20080225 HN 1AB L 002
2 20080225 HN 1AB L 002
3 20080225 WW 1p1 L 001
3 20080225 WW 1p1 L 001
Please anybody help me?.
Thanks

Get a programming logic book, look at master file versus transaction file (typically uses a bank as the business example). Try this yourself yet? Any PL/SQL experience? Or is this your homework assignment?
And look up what the definition of unique means in Oracle. Title of your thread is very misleading.

Similar Messages

  • How to generate a Unique key based on a some String value

    Hello every one,
    I am sorry , If I post this question in wrong group... I have a requirement to generate a unique key ( what every it may be alpha, numeric or alpha numeric) based on some String..
    For ex : String str = "AbCX" - Gives a unique key based on "AbCX" value..
    Is there any way we can get the unique value using Java ?
    Thanks

    May be not what you are looking for, but here's may idea:
    use a sequence (db sequence) and add it the the string value. This way the value is unique, because the sequence is unique. So you could omit the string theoretically, but your requirement is met.
    It's very easy to get a unique sequence number from the db using java, depending of the technology you use (which you did not say :-( )
    Timo

  • Using javascript to populate one menu based on the choice in another menu

    I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
    Example:
    Main Categories: 1) Numbers     2) Letters
    Sub Categories:        1                      a
                                   2                      b 
                                   3                      c
                                  etc.                  etc.
    the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
    Is there an easy way to do this in Dreamweaver?
    Thanks,
    YWSW

    How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
    Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.

  • Need to Create Unique key basis on Internal Refrence code in Oracle Product Hub

    Hi Friends
    We are in to new development of product catalog in Oracle Product Hub , As per the client requirmnent we have to
    create  a primary key attribute basis on the Internal refrence code for product and promotion
    can any one please take interest and help for us to resolve this iussue.
    Praveen Singh Rathore

    Hi,
    Thanks,
    There are 3 columns involved with that table . Out of whihc one is a Primary Key (string) , The other column (Number) has a unique key constraint defined on it and the last column stores a value corresponding to the 2nd column.
    The reason for me to do a create in the Finder exception is as follows.
    I Loop through the Data present in JTable. As given in the example let us assume that there are 2 rows in the JTable. Out of whihc the First row needs an updation and the second row , which is a new row needs to be created. So During the First iteration of the loop, The findermethod does not throw any exception (Because it is a modfied row) and hence the update gets fired successfully. During the second iteration , since it is a new row the findermethod will throw a finder exception and hence create will get fired.
    I understand that this is not a good coding style but then it is not 100% wrong and i need to find out as to why it is not working.
    Hope am clear in explaining my problem
    Thanks
    Shanki

  • Populate text field based on the lov selected value

    Hi,
    based on the value selected in lov, i want to populate another text field. Below is the code I have written
    In PFR:
    if(pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    if ("lovCategory".equals(lovInputSourceId))
    java.util.Hashtable lovResults = pageContext.getLovResultsFromSession(lovInputSourceId);
    if(lovResults!=null)
    String value =(String)lovResults.get("lovCategory");
    amobj.categorycode(value);
    AMImpl code:
    public void categorycode(String code) {
    sundryCodeVOImpl vobj = getsundryCodeVO1();
    vobj.setWhereClause( "lookup_code = "+"'"+code+"'");
    vobj.reset();
    vobj.executeQuery();
    String desc = vobj.first().getAttribute("Description").toString();
    String attr = vobj.first().getAttribute("Attribute1").toString();
    testEOViewImpl vobj1 = gettestEOView1();
    vobj1.getCurrentRow().setAttribute("CodeDescription",desc);
    vobj1.getCurrentRow().setAttribute("PurchasingCategoryCd",attr);
    vobj1.executeQuery();
    With this code, the updated values for the attributes CodeDescription, PurchasingCategoryCd are getting inserted into the database table but they are now showing up in the text fields when a value is selected in lov.
    Please tell me what is the mistake I'm doing.
    Thanks
    Sunny

    I'm using Lov Map to populate the lov field say field A. But I need to populate another field say field B based on the value selected in field A.
    to give an example of my requirement. Consider a view object having attributes col1,col2,col3 and having following data.
    col1--col2--col3
    1-----a-------x
    2-----b------y
    3-----c------z
    I 'll populate the lov of field A with values in col1. when user selects value 1 in field A. automatically field B should show value 'a'. If user selects value 2 in field A, field B should show value 'b' so on.
    Thanks
    Sunny

  • Need to populate an oracle table with the contents of ms-access table

    Dear All,
    I need a simple way to populate an oracle table from the table which is exist in ms-access mdb. Can we make some kind of constant link in between oracle db and ms-access db? So we will be able to perform this task whenever is required. Kindly help!
    Thanks!
    Zia

    For solving your problem, I Created a link table using ODBC. Now there is a linked table in access's mdb; but if i update the column values; i am getting following error: (after 1 min wait)
    ODBC--update on linked table 'SCOTT_T' failed.
    [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation (#1013)
    I do'nt know; why this error is comming.

  • Filling in values based on the column and row headers

    I have a question that seems simple, but I can't figure out how to do it and I've searched all over the forum to no avail.
    I have one column that is width increasing by 3 in. increments (column A)
    I have one row that is height increasing by 3 in. increments (row B)
    I have one cell that is price (cell A1)
    I have a formula to calculate price per sq. ft.: =CEILING(A3B2/144,1)A1. This gives me the whole sq. ft. number multiplied by the price per sq. ft. to give me a total price at that dimension (A3 is the width, B2 is the height, and A1 is the cell that contains the price per sq. ft.).
    *Here is the problem*: When I try to cut and paste or fill the formula to the other cells, it doesn't calculate the formula as =CEILING(column A * Row B/144,1)*A1. Instead, it moves all of the values relative to the new cell that the formula is being pasted or filled to.
    Is there a way to autofill the cells so that the formula continues to refer to the width column, the height row, and the price cell?

    Aha! Apparently I didn't do enough research before I posted and I have since answered my own question. Here's how you do it. Look for "Distinguishing Absolute and Relative Cell References" and you should be able to find what you need. In my case, here is the formula I needed to have to make the copy and paste function do what I needed it to do: =CEILING($A3*B$2/144,1)*$A$. Hope that helps anyone who may have had the same problem I did.

  • Populate one cell based on the contents of another

    Greetings to all
    I am entering street addresses into numbers. In an effort to save time I would like the entry into column B to determine what is automatically entered into column C
    Example:
    If I enter Jones in column B, I want Street to automatically populate column C in the same row
    If I enter Smith in column B, I want Avenue to automatically populate column C in the same row.
    Thanks in advance for any help.
    AJ

    I assume that "Jones" is "Jones Street" and "Smith" is "Smith Avenue".
    You will need a lookup table with a column containing all of the road names you will be entering, and a second column listing the the matching road type (Street, Avenue, Boulevard, Place, etc.) for each name. Fill the formula shown in the illustration down to all the cells in column C of the Main table.
    I've used IFERROR to flag street names that are not found in the table. To omit the "no match" message and instead show an empty cell, change "no match" to "" in the formula.
    Regards,
    Barry

  • How to populate a dropdown based on the selection from a previous dropdown?

    I am currently trying to build a spreadsheet with three different dropdown menus to choose from.  Based on what is selected from the first drop down though affects what choices are displayed for the next dropdowns.  Is this possible in Numbers? Or should I look for other alternatives for what I'm trying to do.

    Dynamic dropdown (pop-up) menus is not possible in Numbers directly.  If you use scripts you may be able to cobble something together.
    If you REALLY want pop up menus then place ALL the choices in a single pop up grouped together

  • Need to filter unique columns based on other column's values

    I'm rookie and I'm running this query:
    SELECT TO_NUMBER (hs_key) bug, "HS_TABLE_NAME", "HS_COLUMN_NAME",
    "HS_CHANGE_DATE", "HS_CHANGE_TIME", "HS_CHANGER", "HS_NEW_VALUE"
    FROM cb_tdqatodo1_history
    WHERE (hs_column_name) = 'BG_STATUS'
    AND (hs_new_value) LIKE '%Not a Bug'
    AND (hs_change_date, hs_key) IN (
    SELECT MAX (hs_change_date) hs_change_date,
    hs_key
    FROM cb_tdqatodo1_history
    GROUP BY hs_key);
    The result is
    BUG     HS_TABLE_NAME     HS_COLUMN_NAME     HS_CHANGE_DATE     HS_CHANGE_TIME     HS_CHANGER     HS_NEW_VALUE
    101     BUG     BG_STATUS     12/16/2005     17:49:54     helpdesk     Closed Not a Bug
    101     BUG     BG_STATUS     12/16/2005     12:20:22     hgarcia     Not a Bug
    1012     BUG     BG_STATUS     1/21/2005     08:04:56     helpdesk     Not a Bug
    1014     BUG     BG_STATUS     2/1/2005     14:33:56     lossa     Not a Bug
    1020     BUG     BG_STATUS     1/28/2005     17:04:45     fgonzalez     Not a Bug
    I need to resolve the cases when the field BUG has the same value in HS_CHANGE_DATE but different value in HS_CHANGE_TIME without impact the rest of the records?
    In this case I need the result just show me one Bug per line.
    Thanks

    Basically you want to create two filters on different columns and have OR clause between them instead of an AND. To acheive this, add both of your filters, once added you will the them in the filters section. Click on AND, and it will change to OR. This should solve your problem.
    Look at the below image where you can see two filters with an AND clause. Clicking on AND will change it into OR.
    http://gerardnico.com/wiki/_media/dat/obiee/presentation_service/obiee_filters.jpg
    Close thread and award points please.
    Thanks,
    -Amith.

  • How to get the card unique  key(KMC) and the key data

    I want to know how to get them above in the applet.
    If can't, how to do?
    Edited by: 893695 on 2011-10-28 上午5:03

    But during personalization, where are the the application level key(derived three key: enc, mac, dek) come from?They are generated by whatever is doing the personalisation. If they are application level they are stored in the application. If they are ISD/SSD keys they are not accessible to the applet.
    the custom command "put key"?Either custom or ISO7816-4 or GlobalPlatform. Once again it depends on where the keys come from or are stored.
    Cheers.
    Shane

  • How to find the Org.key based on Job key and Org Unit.

    Hi,
      Please Let me know how to find the Org.Key based on the Job Key and org Unit.
    Regards
    nagendra.

    On recent ThinkPad, the Product ID Key sticker has been moved from the bottom of the unit to behind the battery.
    You need to contact Lenovo technical support directly to ask about recovery media.

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • Based on the user response need to calculate measures in universe

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

Maybe you are looking for

  • BI Generic Datasource

    Hi Gurus , I have created the generic datsource called as ZMATERIALINVENTORYPRICE. I believe that once you create the generic datsource you donot have to activate it. once it is saved , it is automatically activated(correct me if i am wrong) when i t

  • "Sort by site" is not working in the history bar

    The other "sort by" options in the history bar are working fine. Each time I change it, the list of websites gets re-sorted. Except for Sort by site, which isn't doing anything. Is there a fix for this problem?

  • Printing double side

    Hi, I have a problem printing from a network printer, the printer is Toshiba e-studio600-04423023. i wanted to print double side for my pdf file or any word document, but the option in "printing option->layout->two sided" was grey out , i am not able

  • MacBook Pro (early 2011) won't boot, sleep light comes on and fans come on high.

    Just had a stick of RAM and the CPU replaced by Apple for an unrelated issue, but now this has cropped up. A little searching indicated that the GPU became unsoldered, but I'm curios if anyone can shed some light on this issue. Thanks.

  • I met a problem when I deploy a entity bean!

    I had developed a simple entity--only have two columns use Jbuilder 6.0 Enterprise, when I deploy it with weblogic 6.1,I met the following error : weblogic.j2ee.DeploymentException: Error deploying application mpassword: Unable to deploy EJB: Passwor