我有以下查詢列出兩個表的僱員。SQL更新查詢選擇查詢
我需要將a.staffdiscountstartdate更新爲'20100428'如何爲此重寫以下查詢?
select
a.employeeid,
b.employeeid
from
tblEmployees a
left join
tblCards b
on
a.employeeid=b.employeeid
where
GroupStartDate < '20100301'
and
StaffDiscountStartDate > '20100428'
and
datediff(day,groupstartdate,staffdiscountstartdate)>1
and
b.employeeid is null
+1第一部分也是我的解決方案(我現在將刪除...該死的我的手指慢...) – amelvin 2010-03-22 16:30:05