I finally have the end results working properly. The statement looks in three different places in a specific order to find the answer. The first place that is not null populates the field.
However, now I must build a validation file on at least one of the resulting fields in the Query.
I have no idea how to add a COUNT(*) to the statement. Everything errors out and all the answers online do not fully explain how to accomplish this.
I need a Total # of Lines in the query as my result.
Attached is my query. It is MS SQL Server Management Studio v17.4.[embedCostItems.xlsx
I have also attached some sample data. My answer for the Count(Coalesce etc) should be 37, because there are 37 rows in the excel document.