I am trying to weed out bad data in a Address table. I have an instance where
Column Address3 imported City, state, and zip and Column Zip also imported the zip code in random cases. I need to get rid of the zip code in these random cases. I want to run a comparison of Address3 and Zip to see where Address3 is LIKE Zip or vise versa so I can isolate the data. For example:
Column Address 3
Watertown, NY 15674
What would be a query that would compare these? Thanks! X)
Do you want to compare the five last characters from column "Address3" with column "ZIP" and you want all lines where these a different?
Assuming that column "ZIP" is a text or varchar column.
In the examlpe below you have to replace "Your_Table_Name" with the right table name of course.
WHERE substr(Address3,length(Address3)-4,5) <> ZIP;