cancel
Showing results for 
Search instead for 
Did you mean: 

exposed names

Former Member
0 Kudos

hi kings,

i get the error message in crystal report for using the below query.here i joined the oitm table in two times but its necessary so only i joined.when i am using the this query for crystal report its through the error"the objects'oitm' and 'oitm' in the from clause have the same exposed names.use correlation names to distinguish them.....

SELECT '42', "oign"."DocNum", "oign"."DocDate", "ign1"."ItemCode", "ign1"."Dscription" ItemName, "ign1"."Quantity" , Convert(numeric(20,2),"wor1"."u_pr"), Convert(numeric(20,2),("wor1"."u_pr"*"ign1"."quantity")), "ign1"."U_UBundletoKg", "oitm"."invntryuom", '', "oign"."WhsCode" FROM "OIGN" T0 INNER JOIN "IGN1" T1 ON "oign"."DocEntry "= "ign1"."DocEntry" inner join "OWOR" T2 on "ign1"."Baseentry" = "owor"."docentry" inner join "wor1" t4 on "owor"."docentry" = "wor1"."docentry" inner join "oitm" t3 on "wor1"."itemcode" = "oitm"."itemcode" left join "oitm" t5 on "ign1"."itemcode" = "oitm"."itemcode" WHERE "owor"."DocNum" = '[%0]' and "ign1"."trantype" = '' and "oitm"."invntitem" = 'N'

Thanks & best regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The alias are for you to identify tables. When different alias assigned to the same table, system will treat them separately. Therefore, you need to replace both oitm with T3 or T5 in the inner join clauses.

Thanks,

Gordon

former_member583013
Active Contributor
0 Kudos

When you use an Alias with a table name you should use the same Alias in the Joins

Example in this highlighted portion of SQL use T3.ItemCode where you use T3 for OITM and in the second instance use T5.ItemCode

"oitm" t3 on "wor1"."itemcode" = "oitm"."itemcode" left join "oitm" t5 on "ign1"."itemcode" = "oitm"."itemcode" WHERE "owor"."DocNum" = '%0' and "ign1"."trantype" = '' and "oitm"."invntitem" = 'N'

Former Member
0 Kudos

Thanks you very mcuh

i solve that problem using alias