Skip to content

Instantly share code, notes, and snippets.

@wvpv
Last active June 21, 2017 16:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wvpv/c1714454430c5c275ebcf694d12f134d to your computer and use it in GitHub Desktop.
select
s.[SubscriberKey] [Subscriber Key]
, s.EmailAddress [Email Address]
, case
when r.RegionID = '1' then 'Omaha'
when r.RegionID = '2' then 'Kansas City'
when r.RegionID = '4' then 'Texas'
else 'Online'
end as [Store Location]
, isnull(r.RegionId,'0') RegionID
from Master_Subscribers s with (nolock)
left join RegionID_ZipCodes r on (r.ZipCode = s.[Zip Code])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment