怎样把如下代码修改为不用Left Join之类的,只想要Select...From...Where...Select top 10 M.Col_070,M.Col_199,M.Col_201,M.Col_086,M.Col_117,M.Col_076,M.Col_003,M.Col_004,M.Col_006,M.Col_001
From TA_Logistics as m Left Join dbo.TB_DomainJY as B
ON charindex(substring(M.Col_070,1,2),B.JY_004) > 0
Where M.Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59'
希望代码如下:(因为我的C#程式是用的是邦定,不支持更新多表的原因)Select top 10 Col_199,Col_201,Col_070,Col_086,Col_117,Col_076,Col_003,Col_004,Col_006,Col_001
From TA_Logistics
Where Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59'
And Col_070 ???? charindex(substring(Col_070,1,2),JY_004) > 0 不知道我说清楚了没?
From TA_Logistics as m Left Join dbo.TB_DomainJY as B
ON charindex(substring(M.Col_070,1,2),B.JY_004) > 0
Where M.Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59'
希望代码如下:(因为我的C#程式是用的是邦定,不支持更新多表的原因)Select top 10 Col_199,Col_201,Col_070,Col_086,Col_117,Col_076,Col_003,Col_004,Col_006,Col_001
From TA_Logistics
Where Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59'
And Col_070 ???? charindex(substring(Col_070,1,2),JY_004) > 0 不知道我说清楚了没?
From TA_Logistics as m
Where M.Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59'
Select
top 10 M.Col_070,M.Col_199,M.Col_201,M.Col_086,M.Col_117,M.Col_076,M.Col_003,M.Col_004,M.Col_006,M.Col_001
From
TA_Logistics as m
Where
(M.Col_076 between '2010-07-01 00:00' and '2010-07-14 23:59') and
exists (
select
*
from
dbo.TB_DomainJY as B
where
charindex(substring(M.Col_070,1,2),B.JY_004) > 0
)