<?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: ps/sql code for merge/copy/delete in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171779#M898568</link>
    <description>My dear &lt;BR /&gt;&lt;BR /&gt;I am closing for the day. I am off for 3 days.&lt;BR /&gt;&lt;BR /&gt;All the best. I learnt a lot while solving this post.&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;sks</description>
    <pubDate>Fri, 23 Jan 2004 07:04:51 GMT</pubDate>
    <dc:creator>Sanjay Kumar Suri</dc:creator>
    <dc:date>2004-01-23T07:04:51Z</dc:date>
    <item>
      <title>ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171762#M898551</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a DB, with a temp_table that is loaded with data every hour via sqlldr direct parallel method.There &lt;BR /&gt;is also a prod_table, with indexes &amp;amp; daily partitions, that needs to be loaded with the data from&lt;BR /&gt;the temp_table, and then the coppied/merged temp_table data must be deleted from the temp_table.&lt;BR /&gt;Can someone please help with a PL/SQL procedure/package/trigger code that can be used for the extraction/copy/merge/delete of&lt;BR /&gt;data from temp_table to prod_table.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 01:22:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171762#M898551</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T01:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171763#M898552</link>
      <description>If structure of both the tables is same, then check the following:&lt;BR /&gt;&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table;&lt;BR /&gt;delete from temp_table;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 02:01:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171763#M898552</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T02:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171764#M898553</link>
      <description>Hi Sanjay,&lt;BR /&gt;&lt;BR /&gt;Thanks for the feedback.Will the delete only delete records that were inserted? Is the sql you provided the mist optimal method&lt;BR /&gt;or do you have any PL/SQL code which would be better?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 02:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171764#M898553</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T02:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171765#M898554</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;the optimal method will depend on the number of records you are loading.&lt;BR /&gt;&lt;BR /&gt;You did not state the database versions etc.&lt;BR /&gt;&lt;BR /&gt;please provide more information.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Fri, 23 Jan 2004 02:31:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171765#M898554</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-01-23T02:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171766#M898555</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;This is one of the method.&lt;BR /&gt;&lt;BR /&gt;Delete will delete all the rows from temp_table.&lt;BR /&gt;&lt;BR /&gt;This is what I could get from your original post.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 02:36:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171766#M898555</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T02:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171767#M898556</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Apologies, the temp_table will have minimum of 10 million records per day. Any advice on most&lt;BR /&gt;optimum PL/SQL?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 03:01:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171767#M898556</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T03:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171768#M898557</link>
      <description>1. truncate table xxx; will be faster compare to delete from xxx. It will not generate undo information.&lt;BR /&gt;&lt;BR /&gt;2. Drop all indexes on prod_table before bulk load to hasten the loading.&lt;BR /&gt;&lt;BR /&gt;3. Recreate the index subsequently.&lt;BR /&gt;&lt;BR /&gt;sks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Jan 2004 03:25:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171768#M898557</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T03:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171769#M898558</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The prod_table cannot have disabled/dropped indexes during the bulk load due to users querying it. &lt;BR /&gt;Besides rebuilding/recreating an index on a VLOB table will take hrs in which time users will not be able&lt;BR /&gt;to run queries.We require a solution that will ensure fast data loads; fast prod_table loads via copy/merge and also fast querying during&lt;BR /&gt;copy/merge? Your assistance is most appreciated!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 03:36:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171769#M898558</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T03:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171770#M898559</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;since you are using partitioned tables, this opens up the interesting possibility of:&lt;BR /&gt;&lt;BR /&gt;yd@MYDB.MU&amp;gt; alter table t&lt;BR /&gt;  2  exchange partition p_0012&lt;BR /&gt;  3  with table NEW_DATA&lt;BR /&gt;  4  without validation&lt;BR /&gt;  5  /&lt;BR /&gt;&lt;BR /&gt;and you could easily swap a new set of data in there at the drop of a hat (and not lose grants, etc)....&lt;BR /&gt;&lt;BR /&gt;You could also turn this table with a single partition into a multi-partitioned table without a dump and reload (or using the dbms redefinition package in 9i)&lt;BR /&gt;&lt;BR /&gt;Also, to rebuild the indexes you can simply use:&lt;BR /&gt;ALTER TABLE table_name MODIFY PARTITION part_name REBUILD UNUSABLE LOCAL INDEXES&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Jan 2004 04:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171770#M898559</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-01-23T04:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171771#M898560</link>
      <description>Another thing which you can try is commit the bulk insert after every load of n rows where n can be 1/10 of number of rows which are loaded.&lt;BR /&gt;&lt;BR /&gt;After this batch insert same rows also need to be deleted from temp_table.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 04:45:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171771#M898560</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T04:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171772#M898561</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We are looking for a pl/sql code which does the following:&lt;BR /&gt;a cursor containing the records selected from the temp_table, after fecthing each row, each row must be&lt;BR /&gt;inserted into the prod_table after which the procedure must terminate. Any ideas how to PL/SQL code the above?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 04:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171772#M898561</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T04:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171773#M898562</link>
      <description>hi again,&lt;BR /&gt;&lt;BR /&gt;You did not mention your database version.&lt;BR /&gt;&lt;BR /&gt;If you have 9i DB release 2, you can also sync up the flat file with the database table using this single command:&lt;BR /&gt;&lt;BR /&gt;merge into EMP e1&lt;BR /&gt;using EXTERNAL_TABLE e2&lt;BR /&gt;on ( e2.empno = e1.empno )&lt;BR /&gt;when matched then&lt;BR /&gt;    update set e1.sal = e2.sal&lt;BR /&gt;when not matched then&lt;BR /&gt;    insert ( empno, ename, job, mgr, hiredate, sal, comm, deptno )&lt;BR /&gt;    values ( e2.empno, e2.ename, e2.job, e2.mgr, e2.hiredate, e2.sal, e2.comm, &lt;BR /&gt;e2.deptno )&lt;BR /&gt;/&lt;BR /&gt;commit;&lt;BR /&gt;&lt;BR /&gt;that'll update the records in the EMP table from the flat file if they exist OR it will insert them.&lt;BR /&gt;&lt;BR /&gt;Doing a direct path load would simply be:&lt;BR /&gt;insert /*+ append */ into emp select * from external_table;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Fri, 23 Jan 2004 05:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171773#M898562</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-01-23T05:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171774#M898563</link>
      <description>Check the following PL/SQL (Where f1 is a assumed field in both the tables)&lt;BR /&gt;&lt;BR /&gt;declare&lt;BR /&gt;  i number := 0;&lt;BR /&gt;  v_row temp_table%ROWTYPE;&lt;BR /&gt;  cursor C1 is SELECT * FROM temp_table;&lt;BR /&gt;begin&lt;BR /&gt;  OPEN C1; &lt;BR /&gt;        LOOP &lt;BR /&gt;            FETCH C1 INTO v_row; &lt;BR /&gt;            EXIT WHEN C1%NOTFOUND; &lt;BR /&gt;            insert into prod_table (f1) values (v_row.f1);&lt;BR /&gt;      i := i + 1;             &lt;BR /&gt;      if i &amp;gt; 10000 then&lt;BR /&gt;         commit;&lt;BR /&gt;         i := 0;&lt;BR /&gt;      end if;&lt;BR /&gt;        END LOOP; &lt;BR /&gt;        CLOSE C1; &lt;BR /&gt;delete from temp_table;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 05:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171774#M898563</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T05:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171775#M898564</link>
      <description>Hi Sanjay,&lt;BR /&gt;&lt;BR /&gt;Thanks for the assistance! If there are 39 columns how would one specify that in your code? And can&lt;BR /&gt;your code be included in a procedure?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 06:13:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171775#M898564</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T06:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171776#M898565</link>
      <description>Multiple fields can be inserted like:&lt;BR /&gt;&lt;BR /&gt;insert into prod_table (f1, f2, ...) values (v_row.f1, v_row.f2, ...);&lt;BR /&gt;&lt;BR /&gt;where .... is for more fields.&lt;BR /&gt;&lt;BR /&gt;I am just checking the other part.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 06:30:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171776#M898565</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T06:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171777#M898566</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The above PL/SQL was saved as a procedure &amp;amp; when executed the estimated duration for a single daily&lt;BR /&gt;partition is 40 hrs? Is the code at its optimum?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Fri, 23 Jan 2004 06:48:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171777#M898566</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-01-23T06:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171778#M898567</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I don't think so as rows are inserted into prod_table one by one using cursor. And we are loading lot of rows in the cursor which is in memory.&lt;BR /&gt;&lt;BR /&gt;So the better soultion is what I posted first &lt;BR /&gt;&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table;&lt;BR /&gt;delete from temp_table;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;Above insert can be changed to following if fields names are different.&lt;BR /&gt;&lt;BR /&gt;insert into prod_table (f1, f2) select f1,f2 from temp_table;&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 07:00:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171778#M898567</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T07:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171779#M898568</link>
      <description>My dear &lt;BR /&gt;&lt;BR /&gt;I am closing for the day. I am off for 3 days.&lt;BR /&gt;&lt;BR /&gt;All the best. I learnt a lot while solving this post.&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Fri, 23 Jan 2004 07:04:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171779#M898568</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-01-23T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171780#M898569</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;Please allow me to add the following...&lt;BR /&gt;&lt;BR /&gt;You can optimize on the "best way" suggested by sks above by breaking the statement into several parts and launch them in parallel.&lt;BR /&gt;&lt;BR /&gt;But this would imply some prior knowledge of the data in the temporary table.&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table;&lt;BR /&gt;delete from temp_table;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;would be:&lt;BR /&gt;Script1&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table where &lt;CONDITION 1=""&gt;;&lt;BR /&gt;delete from temp_table where &lt;CONDITION 1=""&gt;;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table where &lt;CONDITION 2=""&gt;;&lt;BR /&gt;delete from temp_table where &lt;CONDITION 2=""&gt;;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;begin&lt;BR /&gt;insert into prod_table select * from temp_table where &lt;CONDITION n=""&gt;;&lt;BR /&gt;delete from temp_table where &lt;CONDITION n=""&gt;;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;===========================================&lt;BR /&gt;&lt;BR /&gt;where &lt;CONDITION x=""&gt; may be:&lt;BR /&gt;&lt;BR /&gt;&lt;COLUMN&gt; between &lt;VALUE1&gt; and &lt;VALUE2&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj&lt;/VALUE2&gt;&lt;/VALUE1&gt;&lt;/COLUMN&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;&lt;/CONDITION&gt;</description>
      <pubDate>Fri, 23 Jan 2004 08:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171780#M898569</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-01-23T08:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: ps/sql code for merge/copy/delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171781#M898570</link>
      <description>Edgar,&lt;BR /&gt;&lt;BR /&gt;I have a thought.  It would require some changes to your temp table, and it would make changes to your application more difficult, but...&lt;BR /&gt;&lt;BR /&gt;What about adding an additional field into your temp_table (and prod if need be, it would simplify things) that you could put a distinct identifier that would correspond to a load number.  &lt;BR /&gt;&lt;BR /&gt;You could generate a controlfile with a constant load number set and load the tables, and then know exactly what you are moving when you run the procedure or load.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;insert into prod_table as select colB,colB from temp_table where loadnum = '1';&lt;BR /&gt;&lt;BR /&gt;delete from temp_table where loadnum = '1';&lt;BR /&gt;&lt;BR /&gt;This would make it so that you don't need to worry about another load infringing on data that you want to delete.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Fri, 23 Jan 2004 17:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-sql-code-for-merge-copy-delete/m-p/3171781#M898570</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2004-01-23T17:29:00Z</dc:date>
    </item>
  </channel>
</rss>

