web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Query

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

  I have below query but it is giving error when i write this line

(Select sum([Amount]) from [dbo].[Test1$Detailed Vendor Ledg_ Entry]
where [Vendor Ledger Entry No_] = v.[Entry No_] and [Posting Date] = v.[Posting Date] ) as OlAmt

Column 'Test$Vendor Ledger Entry.Entry No_' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

SELECT v.[Posting Date],v.[Document Type],v.[Document No_],v.Description,v.[Currency Code],(Select sum([Amount]) from [dbo].[Test1$Detailed Vendor Ledg_ Entry]
where [Vendor Ledger Entry No_] = v.[Entry No_] and [Posting Date] = v.[Posting Date] and [Entry Type] = 1) as OriginalAmt
FROM [Test0$Vendor Ledger Entry] v
inner join
[Test1$Detailed Vendor Ledg_ Entry] d
on d.[Vendor Ledger Entry No_] = v.[Entry No_]
group by v.[Posting Date],v.[Document Type],v.[Document No_],v.Description,v.[Currency Code]

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    npanchal Profile Picture
    on at
    RE: Query

    can you share the full query to understand your error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans