Help me... very urgent
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Help me... very urgent

  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Unhappy Help me... very urgent

    I have one table "temp" with two fields by name "src" and "target" with the follwing set of values.
    SRC TARGET
    ---------- ---------
    10 20
    20 30
    30 50
    20 70
    80 30
    50 60
    70 80
    90 100

    I need to query on this temp table to retrieve the records with mining option like as follows.
    if select for src as 10 , i need to get the values of target 20 and subsequently target as source like as continues.
    for src 10 target is 20 .. then 20 becomes src then 30 and 70 as targets..then 30 as src and 70 as src like this all targets are linked with src..need to get the results as src and target.
    for src as 10,output should be like as follows

    SRC TARGET
    ---------- ---------
    10 20
    20 30
    30 50
    20 70
    80 30
    50 60
    70 80

    except last record all the records will be selected for src as 10.
    Please help me . i am lookign forward for your valuable help.
    Thanks inadvance,
    Sreedhar Reddy

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Maybe it's the Ritalin I take, but I have no idea what you are asking for, and further, I see nothing about the data or query you have in mind that is "very urgent."

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Urgent?

    Is this what you want?

    SELECT * FROM temp
    CONNECT BY PRIOR target = src
    START WITH src = 10;

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    he has to do his homework so itīs "urgent" LOL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width