<?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: Help Required in Sql in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190777#M689673</link>
    <description>Hi All,&lt;BR /&gt;thanks for support,&lt;BR /&gt;i had completed the task.&lt;BR /&gt;&lt;BR /&gt;Regs,&lt;BR /&gt;Chitta</description>
    <pubDate>Fri, 09 May 2008 03:08:02 GMT</pubDate>
    <dc:creator>Chitta</dc:creator>
    <dc:date>2008-05-09T03:08:02Z</dc:date>
    <item>
      <title>Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190764#M689660</link>
      <description>Hi All,&lt;BR /&gt;i need help to build a query in sql and am using oracle 9i database.&lt;BR /&gt;&lt;BR /&gt;my requirement is&lt;BR /&gt;I want to select some records from table A and those records should not be in the table B and C and should be in the Table D. &lt;BR /&gt;There is a common column for all the table were doc_num and doc_type to compare data.&lt;BR /&gt;&lt;BR /&gt;please Immediate reply would be greatly appricated&lt;BR /&gt;&lt;BR /&gt;regs,&lt;BR /&gt;Chitta.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 02 May 2008 07:25:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190764#M689660</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-02T07:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190765#M689661</link>
      <description>&lt;!--!*#--&gt;Hi chitta,&lt;BR /&gt;&lt;BR /&gt;it should be as easy as this:&lt;BR /&gt;&lt;BR /&gt;select * &lt;BR /&gt;from tableA&lt;BR /&gt;where not exists (select 'x' from tableB where tableA.doc_num=tableB.doc_num and tableA.doc_type=tableB.doc_type)&lt;BR /&gt;and   not exists (select 'x' from tableC where tableA.doc_num=tableC.doc_num and tableA.doc_type=tableC.doc_type)&lt;BR /&gt;and       exists (select 'x' from tableD where tableA.doc_num=tableD.doc_num and tableA.doc_type=tableD.doc_type);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Fri, 02 May 2008 07:49:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190765#M689661</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-02T07:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190766#M689662</link>
      <description>hi again,&lt;BR /&gt;&lt;BR /&gt;a simple example to demonstrate:&lt;BR /&gt;&lt;BR /&gt;Scripts:&lt;BR /&gt;==========&lt;BR /&gt;create table tableA (doc_num number(1), doc_type varchar2(1));&lt;BR /&gt;create table tableB (doc_num number(1), doc_type varchar2(1));&lt;BR /&gt;create table tableC (doc_num number(1), doc_type varchar2(1));&lt;BR /&gt;create table tableD (doc_num number(1), doc_type varchar2(1));&lt;BR /&gt;&lt;BR /&gt;insert into tableA values(1,'A');&lt;BR /&gt;insert into tableA values(2,'B');&lt;BR /&gt;insert into tableA values(3,'C');&lt;BR /&gt;insert into tableA values(4,'D');&lt;BR /&gt;insert into tableA values(5,'E');&lt;BR /&gt;&lt;BR /&gt;insert into tableB values(1,'A');&lt;BR /&gt;insert into tableB values(2,'B');&lt;BR /&gt;&lt;BR /&gt;insert into tableC values(3,'C');&lt;BR /&gt;&lt;BR /&gt;insert into tableD values(4,'D');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Execution:&lt;BR /&gt;==========&lt;BR /&gt;yogi@mydb.mu&amp;gt; select *&lt;BR /&gt;  2  from tableA&lt;BR /&gt;  3  where not exists (select 'x' from tableB where tableA.doc_num=tableB.doc_nu&lt;BR /&gt;m and tableA.doc_type=tableB.doc_type)&lt;BR /&gt;  4  and   not exists (select 'x' from tableC where tableA.doc_num=tableC.doc_nu&lt;BR /&gt;m and tableA.doc_type=tableC.doc_type)&lt;BR /&gt;  5* and       exists (select 'x' from tableD where tableA.doc_num=tableD.doc_nu&lt;BR /&gt;m and tableA.doc_type=tableD.doc_type)&lt;BR /&gt;&lt;BR /&gt;   DOC_NUM D&lt;BR /&gt;__________ _&lt;BR /&gt;         4 D&lt;BR /&gt;&lt;BR /&gt;Elapsed: 00:00:00.26&lt;BR /&gt;yogi@mydb.mu&amp;gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Fri, 02 May 2008 07:59:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190766#M689662</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-02T07:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190767#M689663</link>
      <description>Thank you very much yoogeraj,&lt;BR /&gt;&lt;BR /&gt;But the table have 992345 records,&lt;BR /&gt;and other tables are having 20 to 30 lacks records&lt;BR /&gt;So whenever i issue the command, it get hangs for long time.&lt;BR /&gt;can we make any workarround to make this query fast.&lt;BR /&gt;&lt;BR /&gt;please suggest.&lt;BR /&gt;regs,&lt;BR /&gt;chitta&lt;BR /&gt;</description>
      <pubDate>Fri, 02 May 2008 08:56:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190767#M689663</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-02T08:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190768#M689664</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;to help me better understand what is happening, can you please post the output of the following commands: (run using SQLPLUS)&lt;BR /&gt;&lt;BR /&gt;(example)&lt;BR /&gt;yogi@mydb.mu&amp;gt;set autotrace traceonly&lt;BR /&gt;yogi@mydb.mu&amp;gt;select *&lt;BR /&gt;  2  from tableA&lt;BR /&gt;  3  where not exists (select 'x' from tableB where tableA.doc_num=tableB.doc_num and tableA.doc_type=tableB.doc_type)&lt;BR /&gt;  4  and   not exists (select 'x' from tableC where tableA.doc_num=tableC.doc_num and tableA.doc_type=tableC.doc_type)&lt;BR /&gt;  5  and       exists (select 'x' from tableD where tableA.doc_num=tableD.doc_num and tableA.doc_type=tableD.doc_type);&lt;BR /&gt;&lt;BR /&gt;Elapsed: 00:00:00.15&lt;BR /&gt;&lt;BR /&gt;Execution Plan&lt;BR /&gt;__________________________________________________________&lt;BR /&gt;Plan hash value: 175544403&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;| Id  | Operation            | Name   | Rows  | Bytes | Cost (%CPU)| Time     |&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;|   0 | SELECT STATEMENT     |        |     1 |    60 |    14  (15)| 00:00:01 |&lt;BR /&gt;|*  1 |  HASH JOIN ANTI      |        |     1 |    60 |    14  (15)| 00:00:01 |&lt;BR /&gt;|*  2 |   HASH JOIN ANTI     |        |     1 |    45 |    10  (10)| 00:00:01 |&lt;BR /&gt;|*  3 |    HASH JOIN SEMI    |        |     1 |    30 |     7  (15)| 00:00:01 |&lt;BR /&gt;|   4 |     TABLE ACCESS FULL| TABLEA |     5 |    75 |     3   (0)| 00:00:01 |&lt;BR /&gt;|   5 |     TABLE ACCESS FULL| TABLED |     1 |    15 |     3   (0)| 00:00:01 |&lt;BR /&gt;|   6 |    TABLE ACCESS FULL | TABLEC |     1 |    15 |     3   (0)| 00:00:01 |&lt;BR /&gt;|   7 |   TABLE ACCESS FULL  | TABLEB |     2 |    30 |     3   (0)| 00:00:01 |&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Predicate Information (identified by operation id):&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;   1 - access("TABLEA"."DOC_NUM"="TABLEB"."DOC_NUM" AND&lt;BR /&gt;              "TABLEA"."DOC_TYPE"="TABLEB"."DOC_TYPE")&lt;BR /&gt;   2 - access("TABLEA"."DOC_NUM"="TABLEC"."DOC_NUM" AND&lt;BR /&gt;              "TABLEA"."DOC_TYPE"="TABLEC"."DOC_TYPE")&lt;BR /&gt;   3 - access("TABLEA"."DOC_NUM"="TABLED"."DOC_NUM" AND&lt;BR /&gt;              "TABLEA"."DOC_TYPE"="TABLED"."DOC_TYPE")&lt;BR /&gt;&lt;BR /&gt;Note&lt;BR /&gt;-----&lt;BR /&gt;   - dynamic sampling used for this statement&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Statistics&lt;BR /&gt;__________________________________________________________&lt;BR /&gt;        351  recursive calls&lt;BR /&gt;          0  db block gets&lt;BR /&gt;        926  consistent gets&lt;BR /&gt;         24  physical reads&lt;BR /&gt;        332  redo size&lt;BR /&gt;        390  bytes sent via SQL*Net to client&lt;BR /&gt;        429  bytes received via SQL*Net from client&lt;BR /&gt;          2  SQL*Net roundtrips to/from client&lt;BR /&gt;          8  sorts (memory)&lt;BR /&gt;          0  sorts (disk)&lt;BR /&gt;          1  rows processed&lt;BR /&gt;&lt;BR /&gt;yogi@mydb.mu&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;revert!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;BR /&gt;</description>
      <pubDate>Fri, 02 May 2008 09:35:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190768#M689664</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-02T09:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190769#M689665</link>
      <description>Hi yogeeraj,&lt;BR /&gt;please find the explain plan fro the query&lt;BR /&gt;&lt;BR /&gt;91369 rows selected.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Execution Plan&lt;BR /&gt;----------------------------------------------------------&lt;BR /&gt;   0      SELECT STATEMENT Optimizer=CHOOSE&lt;BR /&gt;   1    0   FILTER&lt;BR /&gt;   2    1     TABLE ACCESS (BY INDEX ROWID) OF 'AP_INV_HDR'&lt;BR /&gt;   3    2       INDEX (RANGE SCAN) OF 'AP_INV_HDR_I1' (UNIQUE)&lt;BR /&gt;   4    1     TABLE ACCESS (FULL) OF 'AP_PAY_LINE'&lt;BR /&gt;   5    1     TABLE ACCESS (FULL) OF 'AP_DBCR_ALLOC_HDR'&lt;BR /&gt;   6    1     INDEX (RANGE SCAN) OF 'AP_INV_LINE_I1' (UNIQUE)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Statistics&lt;BR /&gt;----------------------------------------------------------&lt;BR /&gt;          0  recursive calls&lt;BR /&gt;          0  db block gets&lt;BR /&gt;  399412589  consistent gets&lt;BR /&gt;  379116023  physical reads&lt;BR /&gt;          0  redo size&lt;BR /&gt;   10763754  bytes sent via SQL*Net to client&lt;BR /&gt;      42915  bytes received via SQL*Net from client&lt;BR /&gt;       6093  SQL*Net roundtrips to/from client&lt;BR /&gt;          0  sorts (memory)&lt;BR /&gt;          0  sorts (disk)&lt;BR /&gt;      91369  rows processed&lt;BR /&gt;</description>
      <pubDate>Fri, 02 May 2008 12:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190769#M689665</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-02T12:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190770#M689666</link>
      <description>Hi Chitta,&lt;BR /&gt;&lt;BR /&gt;We still dont have enough information on your tables, indexes, etc.&lt;BR /&gt;&lt;BR /&gt;Based on lines:&lt;BR /&gt;4 1 TABLE ACCESS (FULL) OF 'AP_PAY_LINE'&lt;BR /&gt;5 1 TABLE ACCESS (FULL) OF 'AP_DBCR_ALLOC_HDR'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I would recommend that you create indexes on the columns that you are using to join these tables.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;create index ind_AP_PAY_LINE_2 on AP_PAY_LINE(&lt;COLUMN names=""&gt;) tablespace TBS_IMEDIUM01 pctfree 5;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After you have create the indexes, please re-run the query that i posted earlier and post the output.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;revert!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;/COLUMN&gt;</description>
      <pubDate>Sat, 03 May 2008 05:53:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190770#M689666</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-03T05:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190771#M689667</link>
      <description>Thanks a lot for reply,&lt;BR /&gt;&lt;BR /&gt;I made request to create a index on those tables,&lt;BR /&gt;and for the query, i got another one from the portal i just want to know Whether it is right or not,&lt;BR /&gt;&lt;BR /&gt;here ar ethe qoery,&lt;BR /&gt;select * from A&lt;BR /&gt;where (columns) not in (select from b union all select from c)&lt;BR /&gt; and (columns) in (select from d)&lt;BR /&gt;&lt;BR /&gt;which one i should follow,&lt;BR /&gt;&lt;BR /&gt;early reply would be more helpful to us,&lt;BR /&gt;&lt;BR /&gt;Regs,&lt;BR /&gt;Chitta</description>
      <pubDate>Tue, 06 May 2008 05:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190771#M689667</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-06T05:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190772#M689668</link>
      <description>hi Chitta,&lt;BR /&gt;&lt;BR /&gt;You will have to run the query and analyse the performance as per the autotrace output.&lt;BR /&gt;&lt;BR /&gt;I do not have enough data here to get meaningful results.&lt;BR /&gt;&lt;BR /&gt;Below the output of the second query (gives a better performance)&lt;BR /&gt;&lt;BR /&gt;yogi@mydb.mu&amp;gt;set autotrace traceonly&lt;BR /&gt;yogi@mydb.mu&amp;gt;  select *&lt;BR /&gt;  2  from tableA&lt;BR /&gt;  3  where (tableA.doc_num,tableA.doc_type) not in (select  tableB.doc_num,tableB.doc_type from tableB union all select  tableC.doc_num,tableC.doc_type from tableC )&lt;BR /&gt;  4* and (tableA.doc_num,tableA.doc_type)  in (select tableD.doc_num,tableD.doc_type from tableD)&lt;BR /&gt;&lt;BR /&gt;Elapsed: 00:00:00.14&lt;BR /&gt;&lt;BR /&gt;Execution Plan&lt;BR /&gt;__________________________________________________________&lt;BR /&gt;Plan hash value: 236380764&lt;BR /&gt;&lt;BR /&gt;------------------------------------------------------------------------------&lt;BR /&gt;| Id  | Operation           | Name   | Rows  | Bytes | Cost (%CPU)| Time     |&lt;BR /&gt;------------------------------------------------------------------------------&lt;BR /&gt;|   0 | SELECT STATEMENT    |        |     1 |    10 |    13   (8)| 00:00:01 |&lt;BR /&gt;|*  1 |  FILTER             |        |       |       |            |          |&lt;BR /&gt;|*  2 |   HASH JOIN SEMI    |        |     1 |    10 |     7  (15)| 00:00:01 |&lt;BR /&gt;|   3 |    TABLE ACCESS FULL| TABLEA |     5 |    25 |     3   (0)| 00:00:01 |&lt;BR /&gt;|   4 |    TABLE ACCESS FULL| TABLED |     1 |     5 |     3   (0)| 00:00:01 |&lt;BR /&gt;|   5 |   UNION-ALL         |        |       |       |            |          |&lt;BR /&gt;|*  6 |    TABLE ACCESS FULL| TABLEB |     1 |     5 |     3   (0)| 00:00:01 |&lt;BR /&gt;|*  7 |    TABLE ACCESS FULL| TABLEC |     1 |     5 |     3   (0)| 00:00:01 |&lt;BR /&gt;------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Predicate Information (identified by operation id):&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;   1 - filter( NOT EXISTS ( (SELECT /*+ */&lt;BR /&gt;              "TABLEB"."DOC_NUM","TABLEB"."DOC_TYPE" FROM "TABLEB" "TABLEB" WHERE&lt;BR /&gt;              LNNVL("TABLEB"."DOC_NUM"&amp;lt;&amp;gt;:B1) AND LNNVL("TABLEB"."DOC_TYPE"&amp;lt;&amp;gt;:B2))&lt;BR /&gt;              UNION ALL  (SELECT /*+ */ "TABLEC"."DOC_NUM","TABLEC"."DOC_TYPE" FROM&lt;BR /&gt;              "TABLEC" "TABLEC" WHERE LNNVL("TABLEC"."DOC_NUM"&amp;lt;&amp;gt;:B3) AND&lt;BR /&gt;              LNNVL("TABLEC"."DOC_TYPE"&amp;lt;&amp;gt;:B4))))&lt;BR /&gt;   2 - access("TABLEA"."DOC_NUM"="TABLED"."DOC_NUM" AND&lt;BR /&gt;              "TABLEA"."DOC_TYPE"="TABLED"."DOC_TYPE")&lt;BR /&gt;   6 - filter(LNNVL("TABLEB"."DOC_NUM"&amp;lt;&amp;gt;:B1) AND&lt;BR /&gt;              LNNVL("TABLEB"."DOC_TYPE"&amp;lt;&amp;gt;:B2))&lt;BR /&gt;   7 - filter(LNNVL("TABLEC"."DOC_NUM"&amp;lt;&amp;gt;:B1) AND&lt;BR /&gt;              LNNVL("TABLEC"."DOC_TYPE"&amp;lt;&amp;gt;:B2))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Statistics&lt;BR /&gt;__________________________________________________________&lt;BR /&gt;          8  recursive calls&lt;BR /&gt;          0  db block gets&lt;BR /&gt;         62  consistent gets&lt;BR /&gt;          0  physical reads&lt;BR /&gt;          0  redo size&lt;BR /&gt;        390  bytes sent via SQL*Net to client&lt;BR /&gt;        429  bytes received via SQL*Net from client&lt;BR /&gt;          2  SQL*Net roundtrips to/from client&lt;BR /&gt;          0  sorts (memory)&lt;BR /&gt;          0  sorts (disk)&lt;BR /&gt;          1  rows processed&lt;BR /&gt;&lt;BR /&gt;yogi@mydb.mu&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Tue, 06 May 2008 05:51:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190772#M689668</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-06T05:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190773#M689669</link>
      <description>attached a more readable version of the output.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 05:53:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190773#M689669</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-06T05:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190774#M689670</link>
      <description>Hi,&lt;BR /&gt;Now am getting confused,&lt;BR /&gt;both queries are giving diffrent results,&lt;BR /&gt;i dont know which one is correct.&lt;BR /&gt;&lt;BR /&gt;please confirm,&lt;BR /&gt;&lt;BR /&gt;Regs,&lt;BR /&gt;Chitta</description>
      <pubDate>Tue, 06 May 2008 15:28:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190774#M689670</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-06T15:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190775#M689671</link>
      <description>this might run faster without indexes - give it a try ...&lt;BR /&gt;&lt;BR /&gt;select doc_num,doc_type from &lt;BR /&gt;(( select doc_num,doc_type from tableA)&lt;BR /&gt;intersect &lt;BR /&gt;(select doc_num,doc_type from tableD))&lt;BR /&gt;minus &lt;BR /&gt;(select doc_num,doc_type from tableB)&lt;BR /&gt;minus&lt;BR /&gt;(select doc_num,doc_type from tableC)&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Depending on what you want to do with some records in B, but not in C, or in C but not in B - you may have to play with parenthesis and grouping for the "minus" section.  The above removes records from the result that are in either of B or C.  Your question was not clear on that aspect, however if all of B and C were the same - then you'd just use one of the tables, you wouldn't need both.  Therefore, I wrote the above with removing from the answer set anything in either B or C.</description>
      <pubDate>Tue, 06 May 2008 16:09:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190775#M689671</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2008-05-06T16:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190776#M689672</link>
      <description>Hi,&lt;BR /&gt;Thanks for update,&lt;BR /&gt;my concern is not on performance related,&lt;BR /&gt;&lt;BR /&gt;my requirement is, i want to select some data form table A and the condition is those data should not be in tbale B anc C, and should be in D.&lt;BR /&gt;&lt;BR /&gt;like select a.no from a where a.no&amp;lt;&amp;gt;b.no AND a.no&amp;lt;&amp;gt;c.no AND a.no=d.no&lt;BR /&gt;&lt;BR /&gt;it should be 'AND',&lt;BR /&gt;&lt;BR /&gt;So i had couple of queries having same condition, but giving diffrent result(i.e, varies in total no.of rows)&lt;BR /&gt;&lt;BR /&gt;since the volume of data is very hing (approx'ly, 1,000,000 on each table  am b=not able to run the query handy.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;please advise,&lt;BR /&gt;Regs,&lt;BR /&gt;Chitta.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 May 2008 03:38:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190776#M689672</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-07T03:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190777#M689673</link>
      <description>Hi All,&lt;BR /&gt;thanks for support,&lt;BR /&gt;i had completed the task.&lt;BR /&gt;&lt;BR /&gt;Regs,&lt;BR /&gt;Chitta</description>
      <pubDate>Fri, 09 May 2008 03:08:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190777#M689673</guid>
      <dc:creator>Chitta</dc:creator>
      <dc:date>2008-05-09T03:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help Required in Sql</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190778#M689674</link>
      <description>hi Chitta,&lt;BR /&gt;&lt;BR /&gt;Glad to hear this from you.&lt;BR /&gt;&lt;BR /&gt;Can you please let us know which solution you finally adopted?&lt;BR /&gt;&lt;BR /&gt;also read:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/helptips.do?#34" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/helptips.do?#34&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Fri, 09 May 2008 03:14:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-required-in-sql/m-p/4190778#M689674</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-09T03:14:57Z</dc:date>
    </item>
  </channel>
</rss>

