select SYC_SN,SYC2_CodeDiscribe from V_System_Code where LGC_LGC = 2 and SYC_Type = 44 AND isnull(SYC_Delete,0) =0 order by SYC2_CodeDiscribe select SYC_SN,SYC2_CodeDiscribe from V_System_Code where SYC_Type=3 and LGC_LGC=2 select STC_Code, STC2_ServiceType from V_Service_Type_Code where LGC_LGC = 2 select SYC_SN,SYC2_CodeDiscribe from V_System_Code where LGC_LGC = 2 and SYC_Type = 32 and ltrim(isnull(SYC2_CodeDiscribe,''))<>'' and SYC_Delete=0 order by SYC2_CodeDiscribe select SYC_SN,SYC2_CodeDiscribe from V_System_Code where LGC_LGC = 2 and SYC_Type = 44 AND isnull(SYC_Delete,0) =0 order by SYC2_CodeDiscribe select OPI_ID,OPI_Name,* from OperatorInfo where deleteflag=0 and OPI_Assign=1 select top 1000 coli.COLI_SN, mbi.MEI_SN, coli.COLI_ApplyDate , coli.COLI_sourcetype, coli.COLI_WebCode --select COUNT(1) from CUstomerList as cul INNER JOIN ConfirmLineInfo AS coli ON coli.COLI_SN=cul.CUL_COLI_SN --线路信息 INNER JOIN MemberInfo AS mbi ON mbi.MEI_SN=cul.CUL_CUI_SN --用户信息 LEFT JOIN ConfirmLineReport colr ON colr.COLR_COLI_SN=cul.CUL_COLI_SN --行程经过城市 WHERE isnull(coli.DeleteFlag,0)=0 AND isnull(MEI_NeedBirthCard,0) = 1 AND isnull(MEI_NeedNews,1)=1 --AND MEI_MailList = 'elouisestevens@yahoo.com' AND coli.COLI_WebCode in ('cht') --站点 select WCI_Code,WCI_Describe from WebCodeInfo AND coli.COLI_sourcetype in (32041,32007) --线路类型,PPC,newsletters,QA,InquiryForm等 select SYC_SN,SYC2_CodeDiscribe from V_System_Code where LGC_LGC = 2 and SYC_Type = 32 and ltrim(isnull(SYC2_CodeDiscribe,''))<>'' and SYC_Delete=0 order by SYC2_CodeDiscribe AND coli.COLI_ApplyDate between '2013-01-11' and '2015-01-11 23:59:59' --下订单时间段 select * from ConfirmLineReport