December 31, 2019 at 6:11 am
Hi
On below code i get above error
select T0.DocEntry,T0.DocDate,T0.CardCode
,T1.ItemCode,
,Coalesce((Case When T4.Street = '' Then Null Else T4.Street + ' ' End) + ',' + CHAR(10) + ',' +
(Case When T4.Block = '' Then Null Else T4.Block + ' ' End) + ',' + CHAR(10) + ',' +
(Case When T4.ZipCode = '' Then Null Else T4.ZipCode + ' ' End) + ',' + CHAR(10) + ',' +
(Case When T4.City = '' Then Null Else T4.City + ' ' End) + ',' + CHAR(10) + ',' +
(Case When T4.Country = '' Then Null Else T4.Country + ' ' End) + ',' + CHAR(10) + ',' +
(Case When T4.State = '' Then Null Else T4.State End))
,T5.Chapter,T5.ChapterId
,T6.Location
,T7.AcctName
FROM OPOR T0
inner join POR1 T1 on T0.DocEntry = T1.DocEntry
inner join OCRD T2 on T2.CardCode = T0.CardCode
inner join OITM T3 on T1.ItemCode = T3.ItemCode
LEFT OUTER JOIN CRD1 T4 ON T4.CardCode= T0.CardCode
Thanks
December 31, 2019 at 8:15 am
You have used COALESCE function but haven't supplied multiple arguments. I can see only one argument to your COALESCE function and that may be causing the error.
Either remove COALESCE function or supply other arguments to it and then retry.
Read more about COALESCE here.
December 31, 2019 at 12:08 pm
You also have two commas in a row:
T1.ItemCode,
,Coalesce
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply