Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHERE a = bcd

Status
Not open for further replies.

LinnCounty

Programmer
May 30, 2008
5
0
0
US
I don't have time to search anymore. I can not find the proper keyword.

I need help with a JOIN or a WHERE expression.

TABLE1 contains CASE_NUMBER
TABLE2 contains DEPT,YEAR,NUMBER

CASE_NUMBER is DEPTyearNUMBER

How do I format a JOIN or WHERE statement to use this info?
 




Hi,
Code:
select TABLE1.*, TABLE2.*
From TABLE1, TABLE2
Where CASE_NUMBER = 'DEPT||YEAR||NUMBER'
or whatever concatenation operator your version of SQL recognizes.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Ah.. the pipe dream perfect. I will try it out. THANK YOU!!!
 
I'm using DB2 and did not have enough luck with this as I'd hoped. It looks like the fields in TABLE2 are just not meant to be joined like this. I have found a work around that gets me where I need to go.

Thanks for your help, maybe I'll get to use this in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top