Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    54

    Unanswered: query help please

    Hi,

    I have data as follows in a table called TNR_RESP


    RESP_ID | TYP_ID | CXL_RESP_ID
    123 | 1 | ABC
    ABC | 0 |

    If i pass RESP_ID = 123 to the query, i wanted to see RESP_ID, TYP_ID, CXL_RESP_ID and TYP_ID of CXL_RESP_ID

    Here ABC is reference of another RESP_ID in the same table
    I want to see the result as follows

    123 1 ABC 0

    How do we get the result?
    I appreciate your help.

    Thanks
    Last edited by manth; 12-08-04 at 21:03.

  2. #2
    Join Date
    Apr 2004
    Posts
    64

    reply

    This is one way of doing...

    SELECT A.RESP_ID, A.TYP_ID, A.CXL_RESP_ID, B.TYP_ID
    FROM TNR_RESP A, TNR_RESP B
    WHERE
    A.RESP_ID=123 AND
    A.CXL_RESP_ID=B.RESP_ID

  3. #3
    Join Date
    Mar 2004
    Posts
    54
    Excellent, Thanks

Posting Permissions

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