Hi
I want Last Column heading should be displayed as Location but it is displaying desciption of Column Name from Location table.
SELECT
A."Type",A."SeriesName",A."DocNum",A."DocEntry",A."CardCode", A."CardName",A."DocDate",
A."SecCode",A."SecDesc",A."TaxbleAmt",A."TaxRate",A."WTAmt",A."PAN NO" , "Branch",(Select "Location" from OLCT where "Code" = A."Location") As Location
From (
Select 'AP Invoice' "Type",
T4."SeriesName",T0."DocNum", (Select "BPLName" from OBPL where "BPLId"=T0."BPLId") "Branch",(Select Distinct("LocCode") from PCH1 where "DocEntry"=T0."DocEntry") "Location"
From OPCH T0
Left Join PCH5 T1 On T0."DocEntry"=T1."AbsEntry"
Left Join NNM1 T4 On T4."Series"=T0."Series"
Where T1."Rate">0
)A
Thanks
NakhatraPosted Jan 15, 2025, 3:45 PM
Insted inner query apply joins and in select statement take the fields you want from alias name of table
Jignesh KumarPosted Jan 15, 2025, 9:43 AM
Hello,
Ramco RamcoPosted Jan 15, 2025, 8:57 AM
Hi Jignesh
Instead of displayig Location it is displaying the name of field in Table
Thanks
Jignesh KumarPosted Jan 15, 2025, 6:41 AM
Hello Ramco,
First of all write your query in readable format it will be easier for you to identify issue and easy to understand for other developer as well,