October 12, 2015 at 12:08 am
Hi ,
I have been given below query in oracle format,which I have to convert into TSQL statement.
Oracle Query
inv_item as
(select distinct assoc_item_id
from PBODMAN.recipe1 r,
PBODMAN.item_master i
where connect_by_isleaf = 1
and i.itmtyp = 'INV'
and to_char(r.assoc_item_id) = i.itmid
and I.ITMACTFLG = 1
connect by prior assoc_item_id = primary_item_id)
but I am unaware about connect_by_isleaf and connect by prior function used in query.
could any one help me to derived same above query using SQL statement.
October 12, 2015 at 1:07 am
Quick question, is this hierarchical data?
😎
October 12, 2015 at 1:10 am
Yes sir
October 12, 2015 at 2:21 am
vipin_jha123 (10/12/2015)
Yes sir
Slight different between the two, roughly connect_by_isleaf is the equivalent of GetDescendant
😎
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply