The logic behind this is:- 1.If Invoice number was not on 'yesterday's' downloaded data: a. Days_in_area = 1 2. we havee to Compare current area from 'today's' downloaded data to current area from 'yesterday's downloaded data: a. If both are equal, add 1 to number of days in area b. If different, days_in_area = 1.
there are restrictions for me of not using any procs. Thanks in advance.