Skip to content

Instantly share code, notes, and snippets.

@PeterLehmann
Created July 19, 2012 09:11
Show Gist options
  • Save PeterLehmann/3142404 to your computer and use it in GitHub Desktop.
Save PeterLehmann/3142404 to your computer and use it in GitHub Desktop.
use trio;
select commonCodeMaster.CommonCodeMasterId
, commonCodeMaster.commoncodeDomainId
, commonCodeMaster.code
, commonCodeDomain.DomainName
, commonCodeDetail.[Text]
from
commoncodemaster
inner join commoncodedomain on commoncodedomain.commoncodedomainid = commoncodemaster.commoncodedomainid
inner join commoncodedetail on commoncodemaster.commoncodemasterid = commoncodedetail.commoncodemasterid
inner join Country on CommonCodeDetail.CountryId = Country.CountryId
where country.Code = 'DK'
and commonCodeDomain.DomainName like N'%status%'
--and code = '020'
--and commoncodemaster.commoncodedomainid = 32
order by commoncodedomain.domainname
use master;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment