Order Ledger Notes

Discussions related to custom development with Select.
Post Reply
ckootg
Posts: 122
Joined: Fri Jan 06, 2012 6:10 pm

Order Ledger Notes

Post by ckootg »

How do I get the Ledger Notes for an Order?

In Boylan, the ledger notes were in the dbo.Note table and could join to a Ledger and Order like so

Code: Select all

select n.*
from Ledger l
inner join Note n on n.NoteCollectionID = l.NoteCollectionID
inner join [Order] o on l.OrderID = o.ID
where o.Number = 'XXXXXXX'
In Cameron, I see that ledger notes (core.Notes) have been separated from the order notes (pfm.Note), but how do I join it to the Ledger and Order?
ckootg
Posts: 122
Joined: Fri Jan 06, 2012 6:10 pm

Re: Order Ledger Notes

Post by ckootg »

Bump.
Lisa Ennis
Posts: 84
Joined: Thu Sep 11, 2008 1:57 pm

Re: Order Ledger Notes

Post by Lisa Ennis »

You can join the pt.Ledger table to the core.Notes table on core.Notes.ParentMoniker=pt.Ledger.ID

Code: Select all

SELECT
N.ParentMoniker,
L.Name, 
N.Content
FROM core.Notes AS N
INNER JOIN pt.Ledger AS L ON N.ParentMoniker=L.ID
Lisa Ennis
Senior Report Developer
SoftPro
ckootg
Posts: 122
Joined: Fri Jan 06, 2012 6:10 pm

Re: Order Ledger Notes

Post by ckootg »

Thank you.
Post Reply