Compare Dates in TeraData - 4/19/2007 6:59:23 Invoice Number Run_Date(dd/mm/yy) Current area Day-area 111 01/02/07 A 1 222 02/02/07 B 1 333 03/02/07 C 1 444 04/02/07 A 1 111 01/02/07 A 2 111 02/02/07 B 1
I ahve to work like this here rundate will give the date on which the data was downloaded. If Invoice number was not on 'yesterday's' downloaded data: a. Days_in_area = 1 Compare current area from 'today's' downloaded data to current area from 'yesterday's downloaded data: a. If equal, add 1 to number of days in area b. If different, days_in_area = 1.
can one help me how to check the rundate for a particular invoice number with the yest date? Can one help me in writing the sql query for this?? Thanks in Advance