Skip to content
Advertisement

Query monitoring changes in the field

I need to program a query where I can see the changes that certain fields have undergone in a certain date period. Example: From the CAM_CONCEN table bring those records where the ACCOUNT_NUMBER undergoes a modification in the CONCTACT field in a period of 6 months before the date. I would be grateful if you can guide me.

Advertisement

Answer

You can use LAG() to peek at the previous row of a particular subset of rows (the same account in this case).

For example:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement