Unix Technical Forum

nonequijoin

This is a discussion on nonequijoin within the DB2 forums, part of the Database Server Software category; --> HI, I just wondering if DB2 support nonequijoin... For example there are two tables one is Employees table, the ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 05:20 PM
jane
 
Posts: n/a
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 05:20 PM
AK
 
Posts: n/a
Default Re: nonequijoin

SELECT LAST_NAME, SALARY, GRADE
FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 05:22 PM
jane
 
Posts: n/a
Default Re: nonequijoin

ak_tiredofspam@yahoo.com (AK) wrote in message news:<46e627da.0312071618.4d82d7b5@posting.google. com>...
> SELECT LAST_NAME, SALARY, GRADE
> FROM EMPLOYEE JOIN JOB_GRADE ON SALARY BETWEEN LOWEST_SAL AND HIGHEST_SAL


HI, Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com