- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Help Required in Sql
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2008 08:28 AM
тАО05-06-2008 08:28 AM
Re: Help Required in Sql
Now am getting confused,
both queries are giving diffrent results,
i dont know which one is correct.
please confirm,
Regs,
Chitta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2008 09:09 AM
тАО05-06-2008 09:09 AM
Re: Help Required in Sql
select doc_num,doc_type from
(( select doc_num,doc_type from tableA)
intersect
(select doc_num,doc_type from tableD))
minus
(select doc_num,doc_type from tableB)
minus
(select doc_num,doc_type from tableC)
;
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2008 08:38 PM
тАО05-06-2008 08:38 PM
Re: Help Required in Sql
Thanks for update,
my concern is not on performance related,
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.
like select a.no from a where a.no<>b.no AND a.no<>c.no AND a.no=d.no
it should be 'AND',
So i had couple of queries having same condition, but giving diffrent result(i.e, varies in total no.of rows)
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.
please advise,
Regs,
Chitta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2008 08:08 PM
тАО05-08-2008 08:08 PM
Re: Help Required in Sql
thanks for support,
i had completed the task.
Regs,
Chitta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2008 08:14 PM
тАО05-08-2008 08:14 PM
Re: Help Required in Sql
Glad to hear this from you.
Can you please let us know which solution you finally adopted?
also read:
http://forums11.itrc.hp.com/service/forums/helptips.do?#34
kind regards
yogeeraj
- « Previous
-
- 1
- 2
- Next »