Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
ian maclauchlan 3/24/2017 2:12:16 AM

SQL query

I am trying to write a report fro PA module; it is looking at Cost Categories and the PAProfit and PAbillings fields. However the user wants to see the financial information in the currency of the Project so if the entity I am reporting on has functional currency USD but the project is in GBP then the fields I need to report on are PAMCPAProfitAmt etc,....

So the logic I am looking for is

If PA01201.Currnidx not = to MC40000.funcridx

then PA01301.PA[PAMCBProfitAmt]

else PA01301.[PAProfitAmt]


I have all the joins looking at the tables; in reality what I am looking for is case statement that references fields and depending on the output selects fields rather than values!

I hope that this makes sense if not tell me and I will try and clarify.


Many thanks

Version: GP 2013
Section: Dynamics GP, SQL Scripts

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables