Xref: alice comp.databases.oracle.server:39556
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!newsfeed.cwix.com!204.238.120.130!news-feeds.jump.net!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail
From: mkooloos@hotmail.com
Newsgroups: comp.databases.oracle.server
Subject: SQL: Connect by/Start with
Date: Tue, 02 Feb 1999 14:34:56 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 42
Message-ID: <7972eg$49q$1@nnrp1.dejanews.com>
X-Article-Creation-Date: Tue Feb 02 14:34:56 1999 GMT
X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.02; AK; Windows NT)
X-Http-Proxy: 1.0 x4.dejanews.com:80 (Squid/1.1.22) for client 193.133.137.70

Can anybody tell me what's the difference about this statements AND WHY!!!

1st)
select mic.assembly_item_id
,      mic.component_item_id
,      mic.organization_id
,      level
from   mcg_inventory_components        mic
where  mic.organization_id             = 6
start with mic.assembly_item_id        = &assembly_id
connect by prior mic.component_item_id = mic.assembly_item_id

2nd)
select mic.assembly_item_id
,      mic.component_item_id
,      mic.organization_id
,      level
from   mcg_inventory_components        mic
start with mic.assembly_item_id        = &assembly_id
connect by prior mic.component_item_id = mic.assembly_item_id
where   mic.organization_id = 6

3rd)
select mic.assembly_item_id
,      mic.component_item_id
,      mic.organization_id
,      level
from   mcg_inventory_components        mic
where  mic.organization_id             = 6
start with mic.assembly_item_id        = &assembly_id
connect by prior mic.component_item_id = mic.assembly_item_id
and    mic.organization_id = 6

*** PROBLEM *** The problem is the position of the where-cluase of the
organization_id, and the differences in the results.

THANX,

Michael.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
