nonequijoin

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jane

    nonequijoin

    HI,

    I just wondering if DB2 support nonequijoin...

    For example

    there are two tables

    one is Employees table, the other is JOB_GRADES table

    EMPLOYEES JOB_GRADES

    Last Name Salary GRA LOWEST_SAL HIGHEST_SAL
    King 4000 A 1000 2999
    Kachhar 7000 B 3000 5999
    De Hann 5000 C 6000 9999
    ....


    I want to get the last name, salary and grade from both table.

    How to write the query?

    any suggestion is very appreciated!

    Thanks.
  • AK

    #2
    Re: nonequijoin

    SELECT LAST_NAME, SALARY, GRADE
    FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL

    Comment

    • jane

      #3
      Re: nonequijoin

      ak_tiredofspam@ yahoo.com (AK) wrote in message news:<46e627da. 0312071618.4d82 d7b5@posting.go ogle.com>...[color=blue]
      > SELECT LAST_NAME, SALARY, GRADE
      > FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL[/color]

      HI, Thanks.

      Comment

      Working...