Query - overLimitAmount

"jain cj" <[email protected]> Mon, 01 Sep 2003 07:55:15 +0000
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
Hi,

When I am running a query like this

*******************************************************
SELECT
         	(SELECT LineOfCredit FROM SI_LoanProduct WHERE 
acct.FinancialControlId =
            SI_LoanProduct.ProductId) AS LineOfCredit,
	(acct.acctBalance - la.CreditLimit) as overLimitAmount
FROM
         SI_accountPortfolios acpf,
         SI_productProperties pp,
         SI_accountAssociates assoc,
         SI_FinancialControls fc,
        SI_Accounts acct,
        SI_LOANACCOUNT la
WHERE
        assoc.isDeleted = 'N' AND
        acpf.CustomerId <> 1 AND
        assoc.AssociateCustId = 1 AND
        acpf.AcctPortfolioId = acct.acctPortfolioId(+) AND
        acct.FinancialControlId = pp.ProductId  AND
        acct.deleted = 0 AND fc.FinancialControlId = pp.ProductId   AND
        (la.Undone = NULL OR la.Undone = 0) AND
        assoc.accountId = acct.accountId AND acct.accountId = 
la.accountId(+)
*************************************


getting an error
*****************************************************


---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
General error;-8 POS(12) Execution failed, parse again.
SELECT
         	(SELECT LineOfCredit FROM SI_LoanProduct WHERE 
acct.FinancialControlId =
            SI_LoanProduct.ProductId) AS LineOfCredit,
	(acct.acctBalance - la.CreditLimit) as overLimitAmount
FROM
         SI_accountPortfolios acpf,
         SI_productProperties pp,
         SI_accountAssociates assoc,
         SI_FinancialControls fc,
        SI_Accounts acct,
        SI_LOANACCOUNT la
WHERE
        assoc.isDeleted = 'N' AND
        acpf.CustomerId <> 1 AND
        assoc.AssociateCustId = 1 AND
        acpf.AcctPortfolioId = acct.acctPortfolioId(+) AND
        acct.FinancialControlId = pp.ProductId  AND
        acct.deleted = 0 AND fc.FinancialControlId = pp.ProductId   AND
        (la.Undone = NULL OR la.Undone = 0) AND
        assoc.accountId = acct.accountId AND acct.accountId = 
la.accountId(+)

***************************************************

It is successfully running in oracle(There is no record selected)...I 
created the same table structure in
sap db..so what is the problem...expecting the reply

jain

_________________________________________________________________
Got a wish? Make it come true. 
http://server1.msn.co.in/msnleads/citibankpersonalloan/citibankploanjuly03.asp?type=txt 
Best personal loans!