--下列SQL无效 SELECT CASE MAX(T.CREATE_TIME) WHEN NULL THEN TO_DATE('2019-03-05 00:00:01','yyyy-MM-dd hh24:mi:ss') ELSE MAX(T.CREATE_TIME) END AS CREATE_TIME FROM rpt_daily_transaction T; --需要用下面SQL SELECT CASE WHEN MAX(T.CREATE_TIME) IS NULL THEN TO_DAT
下面是正解 用 is null (case when dbo.Feedback.Funnel is null then '否' when dbo.Feedback.Funnel='否' then '是' when dbo.Feedback.Funnel= '是' then '是' end) as Funnel,(case when dbo.Feedback.Callout is null then '否' when dbo.Feedback.Callout= '否' then '是' when
代码如下 select distinct G.* ,(select BUSINESS_NAME from BusinessInfo where BusinessInfo.BUSINESS_BID=G.G_BUSINESS_ID) as BUSINESS_NAME ,(select sum(StockGNum) from StockDetail where StockDetail.StockGID =G.G_ID) as StockGNum ,(select sum(StockRemovalGNu