Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Highlighted
Member
Posts: 2
Registered: ‎10-11-2021

How to add a column based on a set condition?

I have some invoice deals data and what I would like to do is add an indicator column to give me an idea if a certain deal has been reloaded for the same supplier, same invoice description and same value on another deal_id.

E.g

Deal_id Supplier_name Invoice description Value Status Possibly_Reloaded (‘Y’ or N’) Related_deal

Say I had two deals (deal 1 and 2) and they had the same invoice description, same value but one stated cancelled and the other invoiced in the status col.

How would I add a ‘Y’ indicator in a new col (possibly_reloaded) to the cancelled deal to suggest to me that it has been possibly reloaded again on another deal? Ideally, populate with Y if there is another deal with the same invoice description and value.

it would also be good if I could bring that reloaded deal_id into another column called related_deal.

Would appreciate some support.