HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: NOT IN QUERY
Operating System - HP-UX
1831339
Members
3271
Online
110024
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-15-2004 07:46 AM
03-15-2004 07:46 AM
NOT IN QUERY
Hi,
will below 2 queries gives same result ?
Select distinct pctr_num from TACCT_DAILY_DEPOSIT where pctr_num not in (select distinct pctr_num from ALL_PCTR_MKT_ORG) and as_of_date='04-MAR-2004'
Select distinct a.pctr_num,b.pctr_num from TACCT_DAILY_DEPOSIT a , ALL_PCTR_MKT_ORG b
where a.primary_branch_num=b.pctr_num(+) and
b.pctr_num is null and a.as_of_date = '04-MAR-2004'
Say second query returns me with 2 pctr_nums (100,101).
But when i checked in ALL_PCTR_MKT_ORG those 2 pctr_nums are available.
Where am i going wrong? I want to list all Pctr_num in TACCT_DAILY_DEPOSIT and
NOT IN ALL_PCTR_MKT_ORG. Since data is huge in TACCT_DAILY_DEPOSIT
i'm going for one particular date.
any thoughts ?
Due to huge data first query (not in) takes lot of time, which made me to go for second one.
Thanks!!!!!!!
will below 2 queries gives same result ?
Select distinct pctr_num from TACCT_DAILY_DEPOSIT where pctr_num not in (select distinct pctr_num from ALL_PCTR_MKT_ORG) and as_of_date='04-MAR-2004'
Select distinct a.pctr_num,b.pctr_num from TACCT_DAILY_DEPOSIT a , ALL_PCTR_MKT_ORG b
where a.primary_branch_num=b.pctr_num(+) and
b.pctr_num is null and a.as_of_date = '04-MAR-2004'
Say second query returns me with 2 pctr_nums (100,101).
But when i checked in ALL_PCTR_MKT_ORG those 2 pctr_nums are available.
Where am i going wrong? I want to list all Pctr_num in TACCT_DAILY_DEPOSIT and
NOT IN ALL_PCTR_MKT_ORG. Since data is huge in TACCT_DAILY_DEPOSIT
i'm going for one particular date.
any thoughts ?
Due to huge data first query (not in) takes lot of time, which made me to go for second one.
Thanks!!!!!!!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2004 08:04 PM
03-15-2004 08:04 PM
Re: NOT IN QUERY
Hi
Look at
http://dbforums.com/arch/11/2003/4/738850
Steve Steel
Look at
http://dbforums.com/arch/11/2003/4/738850
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2004 08:21 PM
03-15-2004 08:21 PM
Re: NOT IN QUERY
Try the following:
Bring the + on the left:
Select distinct a.pctr_num, b.pctr_num
from TACCT_DAILY_DEPOSIT a ,
ALL_PCTR_MKT_ORG b
where a.primary_branch_num(+)=b.pctr_num
and b.pctr_num is null
and a.as_of_date (+) = '04-MAR-2004'
sks
Bring the + on the left:
Select distinct a.pctr_num, b.pctr_num
from TACCT_DAILY_DEPOSIT a ,
ALL_PCTR_MKT_ORG b
where a.primary_branch_num(+)=b.pctr_num
and b.pctr_num is null
and a.as_of_date (+) = '04-MAR-2004'
sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP