I am trying to create a Invoiceflag for each invoice (see attached file). One invoice has serveral lines, some with UNERO = N and some without. The idea is to have the enire invoice flagged as N if ANY of it's line item contains UNERO = N.
So FlagIsNewBiz is to return all uniques invoices that contains UNERO = N. Then what I am trying to do is have FlagIsNewBizInvoice = 'YES' when it´s an invoice that is part of the FlagIsNewBiz list and default to 'NO' when it's not on that list. I am not getting any invoices with NewBizInvoice = 'NO'
You have a list of invoices. Each invoice can contain more that one line item. Some of the line items are probably new service items that the business might have started and hence they are marked with the new tag (i.e. UNERO).
Is that right?
What is the final output you are looking at? If you can describe it in use case terms its easier to answer