All pastes #967287 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-02 09:03 UTC
rendered paste body

        select cm.customernumberid, cp2.*
        from Boss_dev..contractproduct cp (nolock)
          join Boss_dev..contractproductcustomernumber cpcm (nolock) on cpcm.contractproductid = cp.contractproductid
          join Boss_dev..customernumber cm (nolock) on cm.customernumberid = cpcm.customernumberid 
		  join contractproduct cp2(nolock) on cp2.contractproductid = cp.contractproductid
        where 1 = 1
          and cp.productid = 11001
          and cp.contractproductstatusid = 1012
          and cp.activationdate is not null
          and cp.deactivationdate is null
          and cp.supplierid = 200005