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

How to do 2 left outer joins in crystal reports.

Status
Not open for further replies.

babayboy

Technical User
Dec 2, 2004
7
US



I tried to do but iam getting an error saying.
ODBC error: non unique table reference: tablename


I have 3 tables Invoice, Sales-Dist, Credit_Memos

I joined first 2 with left outer joins and again left outer join INvoice and Credit memos. And it gives above error.
I tried doing different ways but did not work. Any help will be appreciated.
Thanks
 
SELECT
AR_Credit_Memos."CREDIT_MEMO_AMOUNT",
AR_Invoices."SALES_REP_NUMBER",
AR_Invoice_Sales_Dist."SALES_ACCOUNT_NUMBER"
FROM
"AR_Credit_Memos" AR_Credit_Memos LEFT OUTER JOIN "AR_Invoices" AR_Invoices ON
AR_Credit_Memos."CUSTOMER_ID" = AR_Invoices."CUSTOMER_ID" AND
AR_Credit_Memos."NUMBER_OF_CLOSES_PERFORMED" = AR_Invoices."NUMBER_OF_CLOSES_PERFORMED" AND
AR_Credit_Memos."SALES_REP_NUMBER" = AR_Invoices."SALES_REP_NUMBER"
LEFT OUTER JOIN "AR_Invoice_Sales_Dist" AR_Invoice_Sales_Dist ON
AR_Invoices."CUSTOMER_ID"=AR_Invoice_Sales_Dist."CUSTOMER_ID" AND
AR_Invoices."INVOICE_KEY"=AR_Invoice_Sales_Dist."INVOICE_KEY" AND
AR_Invoices."INVOICE_NUMBER"=AR_Invoice_Sales_Dist."INVOICE_NUMBER"



can we do usin liking expert
 
I always use the linking expert. And it insists that links are all of the same sort, when there are several between two tables. Not a mix of equal and left-outer, which may be the problem.

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. I use Crystal 8.5.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Everything looks ok. I don't see anything that would give that error. Normally with that error, it means you have the same table in the from clause more than once. Are you sure this is exactly the way you had it when you received the error?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top