我这样的一个查询要过滤掉重复条件怎样实现
selectFcontractNamefromt_RPContractt1leftjoinCRM_Contactt2ont2.FCustomerID=t1.FCustom...
select FcontractName from
t_RPContract t1
left join CRM_Contact t2 on t2.FCustomerID=t1.FCustomer
left join t_Organization t3 on t3.FItemID=t2.FCustomerID
left join t_rpContractEntry t4 on t4.FContractID=t1.FContractID
where FMailWarn='40211' and FValiEndDate > '2013-12-15 00:00:00.000' and
FMultiCheckStatus='16' and FEveryMonth='0'
要过滤掉t_Organization表中 FName字段中的重复字段,怎样实现 展开
t_RPContract t1
left join CRM_Contact t2 on t2.FCustomerID=t1.FCustomer
left join t_Organization t3 on t3.FItemID=t2.FCustomerID
left join t_rpContractEntry t4 on t4.FContractID=t1.FContractID
where FMailWarn='40211' and FValiEndDate > '2013-12-15 00:00:00.000' and
FMultiCheckStatus='16' and FEveryMonth='0'
要过滤掉t_Organization表中 FName字段中的重复字段,怎样实现 展开
展开全部
select distinct FcontractName from
t_RPContract t1
left join CRM_Contact t2 on t2.FCustomerID=t1.FCustomer
left join t_Organization t3 on t3.FItemID=t2.FCustomerID
left join t_rpContractEntry t4 on t4.FContractID=t1.FContractID
where FMailWarn='40211' and FValiEndDate > '2013-12-15 00:00:00.000' and
FMultiCheckStatus='16' and FEveryMonth='0'
t_RPContract t1
left join CRM_Contact t2 on t2.FCustomerID=t1.FCustomer
left join t_Organization t3 on t3.FItemID=t2.FCustomerID
left join t_rpContractEntry t4 on t4.FContractID=t1.FContractID
where FMailWarn='40211' and FValiEndDate > '2013-12-15 00:00:00.000' and
FMultiCheckStatus='16' and FEveryMonth='0'
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询