Skip to content

Instantly share code, notes, and snippets.

@n-tran
Created April 3, 2013 02:09
Show Gist options
  • Save n-tran/5297890 to your computer and use it in GitHub Desktop.
Save n-tran/5297890 to your computer and use it in GitHub Desktop.
use mip_portal
go
--chicago
select d.*
,p.provider_id
,p.primary_addr_line_1
,p.provider_default_score
,p.provider_phone
,p.provider_email
from stage.dbo.d_chicagoMeeting as d
left outer join (select *
from provider
where project_id = 38) as p on d.[First Name] = p.provider_name_first
and d.[Last Name] = p.provider_name_last
--and d.[Business City] = p.primary_addr_city
and d.[Business State] = p.primary_addr_realm
order by d.tableId
--dallas
select d.*
,p.provider_id
,p.primary_addr_line_1
,p.provider_default_score
,p.provider_phone
,p.provider_email
from stage.dbo.d_dallasMeeting as d
left outer join (select *
from provider
where project_id = 38) as p on d.[First Name] = p.provider_name_first
and d.[Last Name] = p.provider_name_last
--and d.[Business City] = p.primary_addr_city
and d.[Business State] = p.primary_addr_realm
order by d.tableId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment