SELECT * FROM CARDRECORD AS cardcord LEFT JOIN CARD ON CRCDID=CDID WHERE cardcord.CRCDID='NO1202020002' AND cardcord.CRSTATUS='0' AND cardcord.CRDATE<=CARD.CD_ENABLE_DATE2
cardcord.CRDATE为TIMESAMP
CARD.CD_ENABLE_DATE2为DATE
DB2里有函数进行转换吗
如果有的话在IBATIS里面写SQL语句时能否直接使用
------解决方案--------------------------------------------------------
SELECT *
FROM CARDRECORD AS cardcord
LEFT JOIN CARD ON CRCDID=CDID
WHERE cardcord.CRCDID='NO1202020002'
AND cardcord.CRSTATUS='0'
AND cardcord.CRDATE<=cast(CARD.CD_ENABLE_DATE2 as timestamp)