Icon View Incident Report

Serious Serious
Reported By: Richard Harding
Reported On: 6/14/2007
For: Version 1.04 Build 2
# 2379 NOT EXISTS Returning Same Results as EXISTS

I am storing a tree of contacts in 2 tables - CONTACT & RELATIONSHIP. (Using 1.04 build 2)

For example, the tree

Root Node
==Tom Brown
==Chelsea Clinton
====Bill Clinton
====Hillary Clinton

is stored as:

CONTACT table
==========
ID Name
-- ------
0 Root Node
1 Chelsea Clinton
2 Tom Brown
3 Hillary Clinton
4 Bill Clinton

RELATIONSHIP table
=============
ID Contact1ID Contact2ID
-- ------------- -------------
1 0 1
2 0 2
3 1 3
4 1 4

To get the non-leaf nodes (ie Root Node & Chelsea) the following SQL works. However, using NOT EXISTS to get the leaf nodes gives the same results.

Select *
  FROM Relationship AS R1
  WHERE     EXISTS 
     (SELECT * 
         FROM Relationship AS R2
         WHERE R1.Contact2ID = R2.Contact1ID)



Resolution Resolution
Fixed Problem on 6/15/2007 in version 1.04 build 3


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image