Convert Oracle query to SQL

  • 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.

  • Quick question, is this hierarchical data?

    😎

  • Yes sir

  • 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