I've got 2 table I want to join:
- a zip code / region table correspondance for one country with the beginning of zipcode
- a contact table with email address (subscriberkey), a full zip code and a region column which I want to populate
How do I populate the region zip code in my contact table by using the beginning of zip codes in my correspondance table?
I thought of
SELECT C.email and C.full_zipcode
FROM CONTACTS C
JOIN T.begin_zipcode% on C.full_zipcode
CASE WHEN C.full_zipcode LIKE CONCAT(T.begin_zipcode, '%') THEN T.REGION_WANTED
END as C. REGION
Of course it won't work
Is that possible to do what I want to do?
Thanks!