<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Composite primary keys in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483989#M847417</link>
    <description>Oi.  Well, if pdate is a date field, then you shouldn't have a problem of it conflicting.  &lt;BR /&gt;&lt;BR /&gt;However, the only way to do what you want is to build a PL/SQL block to make these changes for you.  &lt;BR /&gt;&lt;BR /&gt;Exactly how many records do you need to combine in this way?  &lt;BR /&gt;&lt;BR /&gt;Brian</description>
    <pubDate>Fri, 11 Feb 2005 14:14:37 GMT</pubDate>
    <dc:creator>Brian Crabtree</dc:creator>
    <dc:date>2005-02-11T14:14:37Z</dc:date>
    <item>
      <title>Composite primary keys</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483988#M847416</link>
      <description>Company&lt;BR /&gt;BusGroup&lt;BR /&gt;Pdate&lt;BR /&gt;BusType&lt;BR /&gt;Pctr_num&lt;BR /&gt;Dealer_num&lt;BR /&gt;Fund_num&lt;BR /&gt;Segment&lt;BR /&gt;&lt;BR /&gt;These are the composite primary keys in my table.&lt;BR /&gt;&lt;BR /&gt;I also have following columns in same table.&lt;BR /&gt;Daily_balance &lt;BR /&gt;Daily_accts &lt;BR /&gt;Avg Bal&lt;BR /&gt;&lt;BR /&gt;Now,&lt;BR /&gt;&lt;BR /&gt;We are going to update fund_num in this table.&lt;BR /&gt;For eg (Attached Excel for better picture)&lt;BR /&gt;Fund numbers 5 and 8 are going to be changed to 10(a new fund num, hence wont be in my table)&lt;BR /&gt;&lt;BR /&gt;When i update 5 to 10, i wont get any contraint issues, cos 10 is a new fund num.... when i again update&lt;BR /&gt;8 to 10, there could be possibility for constraint violation. In that cases i need to add up daily balance, daily account and also calculate avg balance.&lt;BR /&gt;unlike daily balance and daily account , avg balance&lt;BR /&gt;cannot be added up directly...its needs recalculation.&lt;BR /&gt;&lt;BR /&gt;I have given sample data and required output in attached excel...&lt;BR /&gt;&lt;BR /&gt;Can anyone help me how to acheive them thru a procedure or by any means. I have 25 millions of records in this table.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Raj&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Feb 2005 12:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483988#M847416</guid>
      <dc:creator>jilpangs</dc:creator>
      <dc:date>2005-02-11T12:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Composite primary keys</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483989#M847417</link>
      <description>Oi.  Well, if pdate is a date field, then you shouldn't have a problem of it conflicting.  &lt;BR /&gt;&lt;BR /&gt;However, the only way to do what you want is to build a PL/SQL block to make these changes for you.  &lt;BR /&gt;&lt;BR /&gt;Exactly how many records do you need to combine in this way?  &lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Fri, 11 Feb 2005 14:14:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483989#M847417</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2005-02-11T14:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Composite primary keys</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483990#M847418</link>
      <description>Yes Pdate is a date field but both 5 and 8 fund numbers  will have same date when they are &lt;BR /&gt;merged as 10...so i'll be getting a conflict.&lt;BR /&gt;&lt;BR /&gt;PL/SQL is the way to go. Is that possible to give a sample code , how to calculate avg balance if there is a conflict ..also i need to remove the record if its already present..&lt;BR /&gt;i'm not a expert in pl/sql. please help.&lt;BR /&gt;&lt;BR /&gt;4714368 records to be updated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Raj</description>
      <pubDate>Fri, 11 Feb 2005 14:27:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483990#M847418</guid>
      <dc:creator>jilpangs</dc:creator>
      <dc:date>2005-02-11T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Composite primary keys</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483991#M847419</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;for PLSQL, have a look at the following URL:&lt;BR /&gt;&lt;A href="http://oraclesvca2.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/toc.htm" target="_blank"&gt;http://oraclesvca2.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/toc.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;it is a must read!&lt;BR /&gt;&lt;BR /&gt;if you stil have any trouble with your PLSQL procedure, do let us know.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Sat, 12 Feb 2005 01:13:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483991#M847419</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2005-02-12T01:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Composite primary keys</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483992#M847420</link>
      <description>hi again,&lt;BR /&gt;&lt;BR /&gt;you also have examples of PLSQL procedures at this same site:&lt;BR /&gt;&lt;A href="http://oraclesvca2.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/a_samps.htm#4582" target="_blank"&gt;http://oraclesvca2.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/a_samps.htm#4582&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Sat, 12 Feb 2005 01:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/composite-primary-keys/m-p/3483992#M847420</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2005-02-12T01:14:52Z</dc:date>
    </item>
  </channel>
</rss>

