Skip to Content
0

Changes to a PO number in the Invoice Header

Feb 16, 2017 at 01:03 AM

29

avatar image

Need a query to show the changes to a PO number in the invoice header. See below for my attempt at this.

Thank you for your help!!

SELECT T0.[UpdateDate],T0.[NumAtCard], T2.[NumAtCard] as Newvalue, T1.[NumAtCard]as oldvalue, t3.[U_Name] as CreatedUser, t4.[U_Name] FROM ADOC T0 left join ADOC T1 on t1.NumAtCard = t0.NumAtCard and t1.loginstanc= t0.loginstanc-1 left join OINV T2 on t2.NumAtCard = t0.NumAtCard left join OUSR t3 on t3.userid = t2.usersign left join OUSR t4 on t4.userid =t2.usersign2 WHERE T2.[NumAtCard] <> T1.[NumAtCard] and datediff(dd,T1.[UpdateDate],getdate()) <=0 group by T0.[UpdateDate],T0.[NumAtCard], T2.[NumAtCard], T1.[NumAtCard],t3.[U_Name],t4.[U_Name] order by T0.[UpdateDate]

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nagarajan K Feb 16, 2017 at 01:11 AM
0

Hi,

Which Invoice header? Your query is AR Invoice right?

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded
Danielle Napoli Feb 16, 2017 at 02:22 PM
0

Yes as I stated above Invoice header

Share
10 |10000 characters needed characters left characters exceeded