<?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: create table in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207591#M793036</link>
    <description>Edgar,&lt;BR /&gt;I am not sure what RDBMS you are using. But if you are using RDBMS like Sybase, then you have an option to use BCP (bulk copy) instead of the conventional method of copy as.&lt;BR /&gt;&lt;BR /&gt;If you are using Oracle, i bet they would have some tool like the Sybase BCP for carrying this out instead of depending on COPY AS&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Mobeen</description>
    <pubDate>Wed, 03 Mar 2004 04:51:33 GMT</pubDate>
    <dc:creator>Mobeen_1</dc:creator>
    <dc:date>2004-03-03T04:51:33Z</dc:date>
    <item>
      <title>create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207587#M793032</link>
      <description>We have a daily partitioned fact temp_table(no indexes or primary keys) that is sql loaded via &lt;BR /&gt;the direct method. What we want to do is create a clean copy of the temp_table which does not have&lt;BR /&gt;duplicate records. Does anyone know if its possible to create a copy of the temp_table with a primary key&lt;BR /&gt;column thereby removing duplicate records and also including indexes? If so, what would be the syntax &lt;BR /&gt;of the sql statement?(ie. create copy_of_temp_table ..... as select * from temp_table; )&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Wed, 03 Mar 2004 02:09:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207587#M793032</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-03-03T02:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207588#M793033</link>
      <description>Create table copy_of_temp_table&lt;BR /&gt;as select disctinct * from temp table&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;You may want to add a storage clause, and to add a Primary Key after creation, but this will remove duplicates.&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
      <pubDate>Wed, 03 Mar 2004 03:23:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207588#M793033</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2004-03-03T03:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207589#M793034</link>
      <description>Hi Graham,&lt;BR /&gt;&lt;BR /&gt;The fact temp_table has approx 2.8 billion records, would the select not take days to get a result?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Wed, 03 Mar 2004 04:28:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207589#M793034</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-03-03T04:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207590#M793035</link>
      <description>Edgar&lt;BR /&gt;&lt;BR /&gt;Well, there is no such thing as a free lunch, but given your data size, a better option may to create an empty copy table, add the PK, then populate it using an EXCEPTIONS clause.&lt;BR /&gt;More here ...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/clauses3a.htm#998196" target="_blank"&gt;http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/clauses3a.htm#998196&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
      <pubDate>Wed, 03 Mar 2004 04:41:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207590#M793035</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2004-03-03T04:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207591#M793036</link>
      <description>Edgar,&lt;BR /&gt;I am not sure what RDBMS you are using. But if you are using RDBMS like Sybase, then you have an option to use BCP (bulk copy) instead of the conventional method of copy as.&lt;BR /&gt;&lt;BR /&gt;If you are using Oracle, i bet they would have some tool like the Sybase BCP for carrying this out instead of depending on COPY AS&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Mobeen</description>
      <pubDate>Wed, 03 Mar 2004 04:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207591#M793036</guid>
      <dc:creator>Mobeen_1</dc:creator>
      <dc:date>2004-03-03T04:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: create table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207592#M793037</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;how about adding a unique constraint on the columns in question and using "exceptions into".  &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;==========================================&lt;BR /&gt;create table t as select * from temp_table;&lt;BR /&gt;&lt;BR /&gt;create table exceptions(row_id rowid,&lt;BR /&gt; owner varchar2(30),&lt;BR /&gt; table_name varchar2(30),&lt;BR /&gt; constraint varchar2(30));&lt;BR /&gt;&lt;BR /&gt;alter table t add constraint t_unique unique(a,b,c) exceptions into exceptions;&lt;BR /&gt;&lt;BR /&gt;create table dups&lt;BR /&gt;as&lt;BR /&gt;select *&lt;BR /&gt;from t&lt;BR /&gt;where rowid in ( select row_id from exceptions )&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;delete from t where rowid in ( select row_id from exceptions );&lt;BR /&gt;&lt;BR /&gt;insert into t select distinct * from dups;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Wed, 03 Mar 2004 05:42:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-table/m-p/3207592#M793037</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-03-03T05:42:35Z</dc:date>
    </item>
  </channel>
</rss>

