Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2012
    Posts
    14

    Cool Unanswered: Comparing values

    Is there a way to compare two values from two different tables and if they match return yes?

    So for example FACULTY_T.FacultyID = COMMITTEE_T.FacultyID then a yes would be returned. If not, then nothing would be returned. I am trying to accomplish this in a Select Statement.

    Thank you for your time!

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    select a.col1,decode(a.col2,b.col2,'Y') same
    from table1 a, table2 b
    where a.col1 = b.col1;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jul 2012
    Posts
    14
    I will give it a shot, thanks!

  4. #4
    Join Date
    Jul 2012
    Posts
    14
    Thank you beilstwh! It worked like a charm.

Posting Permissions

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