select
a.memCardGUID as memCardGUID,
a.memGUID as memGUID,
a.memCardType as cardType,
a.memCardCode as cardCode,
a.memCardStatus as cardStatus,
a.isMainCard as isMainCard,
convert(a.effectiveDate,char) as cardCreateDate,
convert(a.expiryDate,char) as expireDate,
a.companyGUID as orgGUID,
a.companyName,
a.storeGUID,
a.storeName,
a.curScore as ljPoint,
convert(a.issueDate,char) as handoverDate,
a.addedBy as handoverHr,
convert(a.createTime,char),
convert(a.modifyTime,char),
case when memCardType=1 then 2 when memCardType=2 then 2 when memCardType=3 then 2 when memCardType=4 then 1 when memCardType=5 then 1 else 2 end as cardType,
convert(a.modifyTime,char) as statusDate,
'未知' as statusReason,
convert(a.modifyTime,char) as timeStamp
from 402_00020002 a
where
a.modifyTime > (select timestamp from sync_402_00020002 order by timestamp desc limit 1)
order by modifyTime
这sql语句最后where加上后查不出来数据