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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

several ON clauses in a JOINT statement

Status
Not open for further replies.

zyrag

IS-IT--Management
Dec 4, 2002
252
0
0
PH
Hi,

How do i create a construct for several ON clauses in a JOINT statement? I have tried to follow the sample presented in sqljet3 help file but could not make it run. Please see sample code below i been trying to work out.

Code:
PARAMETERS iMonth INTEGER;
SELECT tblRanking.Branch_Code,tblRanking.Raw, tblRanking.Wt,tblRanking.Overall_Rank,tblSales_Budget.Rank, tblSales_Budget.iValue,tblSales_Budget.Wt FROM tblRanking INNER JOIN tblSales_Budget ON tblRanking.Branch_Code= tblSales_Budget.Branch_Code [COLOR=red]AND ON tblRanking.Month_ID= tblSales_Budget.Month_ID[/color]



 
SELECT
tblRanking.Branch_Code,
tblRanking.Raw,
tblRanking.Wt,
tblRanking.Overall_Rank,
tblSales_Budget.Rank,
tblSales_Budget.iValue,
tblSales_Budget.Wt
FROM
tblRanking
INNER JOIN tblSales_Budget ON (
(tblRanking.Branch_Code= tblSales_Budget.Branch_Code
AND tblRanking.Month_ID= tblSales_Budget.Month_ID)
)


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top