Skip to Content
0
Former Member
Aug 04, 2015 at 01:38 PM

Customer Balance Query Error

10 Views

Hi Experts,

I have made a query .. The Following Error displays as mentioned below

This is not permitted when the subquery follows =, !=, , >= or when the subquery is used as an expression.

Wat is the problem in this query ???

SELECT

OJDT.TransId,

OJDT.Series,

(SELECT SeriesName FROM NNM1 WHERE ObjectCode = OJDT.ObjType AND Series = OJDT.Series) AS SeriesName,

(SELECT CardName FROM OCRD WHERE ocrd.Cardcode = jdt1.ShortName or jdt1.ContraAct = ocrd.Cardcode) AS 'CustomerName', OJDT.Number,

OJDT.RefDate,

OJDT.DueDate,

OJDT.TaxDate,

OJDT.Ref1,

OJDT.Ref2,

OJDT.Memo,

OJDT.BaseRef,

JDT1.TransID,

JDT1.Debit,

JDT1.Credit,

JDT1.ShortName

FROM OJDT INNER JOIN JDT1 ON OJDT.TransId = JDT1.TransId

ORDER BY

OJDT.RefDate, OJDT.TransId

Regards,

K.Ramasamy