Closed AmandaEyer closed 6 years ago
@AmandaEyer this is done
See dcpdataattributes.sql
Each unit_change_year filed has a code snippet like the one below
UPDATE housing a SET unit_change_2011 = TRIM(b.unit_change_2011), x_dcpedited = TRUE FROM housing_input_dcpattributes b WHERE b.unit_change_2011 ~ '[0-9]' AND a.job_number=b.job_number;
If this logic is not correct let me know
Thanks! From what I can understand from the logic, it's good. Though I don't understand it all ;)
Closing unit_change_year values are being individually assigned based on the corresponding unit_change_year field in dcpdataattributes.sql
@AmandaEyer moving from Slack to here
Okay so the DCP researched unit change values need to be applied after we calculate those fields.
So confirming - if the DCP researched unite_change_year values is not NULL it will overwrite what has been calculated
Yes, if the change_year value is not blank, it should be overwritten. Also, NULL means blank, correct? Because in a few instances, DCP entered value would be 0.
@AmandaEyer yes, NULL means blank
In DCP corrections attributes, a few records have values for unit_change years. (for instance: 121324717, for 2017 and 2018). Can those be pulled into the final output? Or is this complicated because it's spread over various fields?