如果我select语句中包含了一些case语句,如:
SELECT A.PROD_ID, A.LATN_ID, A.BUREAU_KEY, A.PROP_CUST_ID, A.CUST_ID
, A.SERV_ACC_NBR
, CASE
WHEN A.ROLE_ID = 0
AND A.PRICE_NAME NOT LIKE '%4G%' THEN 0
ELSE A.PREFER_VALUE
END AS PREEFER_INFO_VALUE
, CASE
WHEN B.SPEC_LEVEL_4_NAME IN ('我的E家', '商务领航')
AND B.SPEC_LEVEL_3_NAME NOT LIKE '%总机服务%' THEN 1
ELSE 2
END AS RH_TYPE, A.DEV_TE_ID, A.DEV_STAFF_ID, A.PROD_ST_CODE, A.CRT_DT
, A.MDFY_DT, A.PREFER_ID, A.PREFER_NAME, A.PREFER_EEF_DT, A.PREFER_EXP_DT
, A.PREFER_CRT_DT, A.PREFER_MDFY_DT, A.PREFER_STATE, A.PAG_FLAG
, CASE
WHEN TRIM(TRANSLATE(A.JT_CHAN_ID, NULL, '1234567890')) <> NULL
OR A.JT_CHAN_ID = NULL
OR A.JT_CHAN_ID IS NULL THEN 0
ELSE TO_NUMBER(TRIM(A.JT_CHAN_ID))
END AS JT_ZQ_TYPE, A.PRICE_IDS
, CASE
WHEN A.IS_4G_GN = 1
AND A.IS_4G_CARD IN (1, 2)
AND TERMINAL_TYPE LIKE '%4G%' THEN 1
ELSE 0
END AS IS_4G_ALL, COALESCE(C.MDSE_SPEC_KEY, 190000) AS JT_CHAN_TYPE
FROM PROD_CDMA_NEW_599 A
这样的语句,我使用getColumns()会把case中一些用作条件判断的字段也解析出来,想请教一下有没有什么方法只是解析最后用作结果的字段
2条答案
按热度按时间68de4m5k1#
这个应该是bug吧
8yoxcaq72#
@kenputon1 不懂,所以来这边请教一下