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

Can I use a RIGHT JOIN with an AND EXISTS in a query? 1

Status
Not open for further replies.

DPlank

IS-IT--Management
May 30, 2003
1,903
GB
I have a RIGHT JOIN that returns me the correct number of rows. Can I use this within an existing query? The query (and syntax error returned) below

Code:
select ba.ACCOUNTNUMBER, pp.CATALOGUEPRODUCTID
from ccsowner.bsbbillingaccount ba, 
       ccsowner.bsbportfolioproduct pp
Where rownum < 1000
And exists (select ba_pri.ACCOUNTNUMBER
                  from ccsowner.bsbbillingaccount ba_pri right join ccsowner.bsbportfolioproduct pp_pri on ba_pri.PORTFOLIOID = pp_pri.PORTFOLIOID order by ba_pri.ACCOUNTNUMBER)
and   ba.PORTFOLIOID = pp.PORTFOLIOID
and pp.STATUS = 'EN'

Syntax error: missing right parenthesis

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
Thanks - I'll try that!

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top