Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 528.9k

Error - Multi Part Identifier could not be bound

Sep 27 2023 6:11 AM

Hi

  In below code i am getting error - Multi Part Identifier c.credit could not be bound

select CASE WHEN  ROW_NUMBER() OVER (PARTITION BY A.DOCNUM ORDER BY A.DOCNUM)=1 THEN 'Payment' ELSE NULL END 'Type',
--a.DocDate[Posting Date],
CASE WHEN  ROW_NUMBER() OVER (PARTITION BY a.DOCNUM ORDER BY a.DOCNUM)=1 THEN a.DocDate ELSE NULL END [Posting Date]
,CASE WHEN  ROW_NUMBER() OVER (PARTITION BY A.DOCNUM ORDER BY A.DOCNUM)=1 THEN a.DocNum ELSE NULL END [Document No]

,case when d.AcctName<>'' then d.AcctName else e.CardName end 'Particulars'

,CASE WHEN c.Debit=0.00 THEN NULL ELSE C.Debit END [DEBIT(LC)],CASE WHEN c.Credit=0.00 THEN NULL ELSE C.Credit END [CREDIT(LC)]
,CASE WHEN c.FCDebit=0.00 THEN NULL ELSE C.FCDebit END [DEBIT(LC)],CASE WHEN c.FCCredit=0.00 THEN NULL ELSE C.FCCredit END [CREDIT(FC)]

from OVPM  a
left join ojdt b on b.TransId=a.TransId
left join jdt1 c on c.TransId=b.TransId
left join oact d on d.AcctCode=c.ShortName
left join ocrd e on e.CardCode=c.ShortName

where a.docdate='2023/09/26' and a.CANCELED='N'
order by c.credit

Thanks


Answers (2)