Added sql statments to update date field of updated records
Added union all statement to select all gpad records
Modified bind parameters for to count and select all gpad records