but That is all the code existing in my fex.
Not only me, most of us facing problem with the same while writing SQL and it all works fine with WEBFOCUS code.
Do I need to raise case for it. This problem we are facing from yesterday (Not sure)
below is my actual code.
Am having issue with the below query, when am running in webfoucs console.
But the query looks good in oracle sqlplus.
The issue is with the two condition which is highlighted in red.(if you remove one condition,its working fine in webfocus console)
Query:
SQL SQLORA SET SERVER NETXRPT_TN
SQL SQLORA
SELECT
ENT_ID REQUESTID,
PREV_USR USERID,
BUS_PROC_CATG_NM,
REASON,
ACCTNUM ,
RR_NUM ,
OFC_NUM,
CORR_NUM ,
REL_RSN,
TO_CHAR(ACTY_TS,'MM/DD/YYYY')||' '||CURR_USR AS REOPEN_USER,
PREV_TS||' '||PREV_USR AS CLOSE_USER,
BUS_PROC_CATG_NM ||'-'||BUS_PROC_NM || '-' || TPC_NM CATEGORY,
NOTIFY_TYP
FROM
( SELECT F.ENT_ID,
F.CURR_USR,
F.BUS_PROC_CATG_NM BUS_PROC_CATG_NM ,
ROW_NUMBER () OVER ( PARTITION BY A.ENT_ID ,F.ACTY_TS ORDER BY A.ENT_ACTY_TS DESC) RNK,
F.REASON REASON,
F.START_RQST_TS,
A.ACTY_USR_ID PREV_USR,
A.ENT_ACTY_TS PREV_TS,
F.ACCTNUM ACCTNUM ,
F.ACTY_TS,
F.RR_NUM RR_NUM,
F.OFC_NUM OFC_NUM,
F.CORR_NUM CORR_NUM,
F.REL_RSN REL_RSN,
F.BUS_PROC_NM BUS_PROC_NM,
F.NOTIFY_TYP,
F.TPC_NM,
F.TPC
FROM
(SELECT ENTL_CP.ENT_ID ENT_ID,
AL2.ENT_ACTY_TS ACTY_TS,
AL2.ACTY_USR_ID CURR_USR,
B.BUS_PROC_CATG_NM BUS_PROC_CATG_NM,
AL2.ENT_ACTN_RSN REASON,
AL2.ACTN_TY_CD ACTN_TY_CD,
ENTL_CP.START_RQST_TS,
AL2.ACTY_USR_ID ACTY_USR_ID,
ENTL_CP.ACCTNUM ACCTNUM ,
ENTL_CP.RR_NUM RR_NUM ,
ENTL_CP.OFC_NUM OFC_NUM,
ENTL_CP.CORR_NUM CORR_NUM ,
ENTL_CP.ENT_REL_RSN_CD REL_RSN,
B.BUS_PROC_NM BUS_PROC_NM,
ENTL_CP.CSTM_FLD2_TX NOTIFY_TYP,
B.TPC_DSPL_NM TPC_NM,
B.TPC_NM TPC
FROM
CSAT_CRNT_STAT_ACTY ENTL_CP,
EADT_ENT_ACTY_DTL AL2,
CBPT_CATG_BUS_PROC B
WHERE
B.RQST_TY_CD='SRVCE_CNTR_RQST'
AND ENTL_CP.CORR_NUM='3CR'
AND B.BUS_PROC_CATG_NM IN ( 'PAS Trade Support' )
AND AL2.ENT_ACTY_TS >= to_date('06/01/2011','MM/DD/YYYY')
AND AL2.ENT_ACTY_TS < to_date['06/23/2011','MM/DD/YYYY')+1
AND ENTL_CP.ENT_ID=AL2.ENT_ID
AND AL2.BUS_PROC_CD = B.BUS_PROC_CD
AND ENTL_CP.BUS_PROC_CD=B.BUS_PROC_CD
AND ENTL_CP.BUS_PROC_CATG_CD=B.BUS_PROC_CATG_CD
AND AL2.ACTN_TY_CD ='REOP'
AND TRIM(ENTL_CP.SRC_APPL_ID)='SCSS'
AND ENTL_CP.ENT_STAT_CD IN ('H','R','D','X','C','P','A','O')
AND upper( AL2.ENT_ACTN_RSN) in (select UPPER(ENT_ACTY_RSN_TX) from EART_ENT_ACTY_RSN where RSN_TY_CD='R')
) F,
EADT_ENT_ACTY_DTL A
WHERE
A.ENT_ID=F.ENT_ID
below 2 conditionsand A.ENT_ACTY_TS >= F.START_RQST_TS
and A.ENT_ACTY_TS <= F.ACTY_TS
and A.ACTN_TY_CD = 'COMP') AA
WHERE
AA.RNK = 1
AND BUS_PROC_CATG_NM IN ('PAS Trade Support')
;
TABLE FILE SQLOUT
PRINT
*
END
WebFOCUS 8.1.03
Windows, Linux All Outputs