A good tip of using Excel to analyse INSERT INTO statement captured in a Trace file
More than often, you will come across INSERT INTO statements when analysing D365FO trace files.
Below is a good trick to know which values that the system was trying to insert into the tables.
First, copy everything from the statement (click on the Code
section > Ctrl + A
> Ctrl + C
).
Paste the script into Excel.
Remove any empty rows.
Find the VALUES
keyword (usually after RECID
). Insert a new row right below that row you found and cut the VALUES part to it.
Before
After
Copy from VALUES to the end of the script (Choose the VALUES cell > Shift + Ctrl + Down Arrow
).
Paste the copied values to any next columns, starting from the row where the very first column of the table appears.
There, you can look for the columns with their inserted corresponding values.
For example:
- ExpandID = ‘0’
- RecID = ‘5637233827’
- ForecastEntryNumber = ‘PAU-000063760’