niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle
Query not returning same results when displaying one column less
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Marc Eggenberger
*nix forums beginner


Joined: 21 Apr 2005
Posts: 6

PostPosted: Thu Feb 17, 2005 9:53 am    Post subject: Query not returning same results when displaying one column less Reply with quote

Hi there.

I have an Oracle Database 8.1.7.0.0 running on Windows 2000 SP4.
I have a query from one customer which gives a different result when
displaying one column less. No change to the where clause or the joins.
Shouldnt then the same results be returned?

The query is like this:

SELECT a.toolid, c1.valnum AS YS
FROM tms.TDM_TOOL a,
tms.TDM_TOOLVALUES c1

WHERE TOOLCLASSID IN
('D01','D04','D06','D07','D08','M01','M02','M03','M04','M05','M06','M07'
,'M08','M09','M10','M12','T01','T02','T03','T04','T05','T06','T07','T08'
,'T09','T10')
AND c1.toolid (+) = a.toolid
AND c1.TOOLCLASSFIELDSPOS (+) = NVL((SELECT h.TOOLCLASSFIELDSPOS FROM
tms.TDM_TOOLCLASSFIELDS h
WHERE a.TOOLCLASSID =
h.TOOLCLASSID
AND h.functypeid =
'YS'),0)
ORDER BY a.toolid


when I ommit the c1.valnum as sys then more entries are displayed. So
the query look like this then:

SELECT a.toolid
FROM tms.TDM_TOOL a,
tms.TDM_TOOLVALUES c1

WHERE TOOLCLASSID IN
('D01','D04','D06','D07','D08','M01','M02','M03','M04','M05','M06','M07'
,'M08','M09','M10','M12','T01','T02','T03','T04','T05','T06','T07','T08'
,'T09','T10')
AND c1.toolid (+) = a.toolid
AND c1.TOOLCLASSFIELDSPOS (+) = NVL((SELECT h.TOOLCLASSFIELDSPOS FROM
tms.TDM_TOOLCLASSFIELDS h
WHERE a.TOOLCLASSID =
h.TOOLCLASSID
AND h.functypeid =
'YS'),0)
ORDER BY a.toolid

Why is this? shouldn the same results beeing returned?

--
mfg
Marc Eggenberger
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 6:19 am | All times are GMT
navigation Forum index » Databases » Oracle
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts mails returning as spam bahadirtonguc Postfix 0 Fri Apr 04, 2008 7:06 pm
No new posts Very slow query Michael Sutter MySQL 0 Fri Jul 21, 2006 1:10 pm
No new posts Column info without executing query Dan Strömberg PostgreSQL 10 Thu Jul 20, 2006 6:21 pm
No new posts recursive query Jürg Schaufelberger Server 1 Thu Jul 20, 2006 6:06 pm
No new posts How to query on part of a date column? Barry Newton MySQL 4 Thu Jul 20, 2006 5:02 pm

Internet Advertising | Bad Credit Mortgages | eBay | Debt Consolidation | Advertising
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1830s ][ Queries: 16 (0.1209s) ][ GZIP on - Debug on ]