sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
jane's Avatar

nonequijoin


Question posted by: jane (Guest) on November 12th, 2005 06:00 AM
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.
2 Answers Posted
AK's Avatar
Guest - n/a Posts
#2: Re: nonequijoin

SELECT LAST_NAME, SALARY, GRADE
FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL
jane's Avatar
Guest - n/a Posts
#3: Re: nonequijoin

Join Bytes! (AK) wrote in message news:<46e627da.0312071618.4d82d7b5@posting.google.com>...[color=blue]
> SELECT LAST_NAME, SALARY, GRADE
> FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL[/color]

HI, Thanks.
 
Not the answer you were looking for? Post your question . . .
196,827 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,827 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors