Here is my query.. HELP!!
SELECT DECODE(PMRTAGGR_AGG.PMR_TRD_EFF_MO_ID,
1,1,2,1,3,1,4,2,5,2,6,2,7,3,8,3,9,3,10,4,11,4,12,4) AS
PMR_TRD_EFF_MO_ID
,SUM(PMRTAGGR_AGG.PMR_GRSS_SLS_AMT)
,SUM(PMRTAGGR_AGG.PMR_GRSS_REDS_AMT)
FROM PMRTAGGR_AGG,
PFUND_BSE,
PFIRM_BSE
WHERE (PMR_RETAIL_FL = 'Y' OR
PMR_RTL_401K_FL = 'Y')
AND PFU_MFC_NM IN ('PUTNAM','CAYMAN','ALTERNATIVE
PRODUCTS','ALLSTATE','HARTFORD')
AND PFU_PROD_NM <> 'PRIME MONEY MARKET'
-- AND PFI_DST_DSTRB_NO NOT IN ('92367', '93440', '69508', '51237' ,
-- '99978','52912', '52918', '98315', '98713')
AND PMR_EXEC_DSTRB_WID = PFI_DSTRB_WID
AND PMR_FUND_WID = PFU_FUND_WID
AND PMR_TRD_EFF_YR_ID = '2007'
and pfi_dst_dstrb_no = '25856'
GROUP BY PMRTAGGR_AGG.PMR_TRD_EFF_MO_ID
Thanks,
Matt
| Title | Under | Posted on |
|---|---|---|
| MD5 - SHA checksum of a file. | PeopleSoft Technical | 02/07/2012 - 5:29am |
| nVision Tabular Report through PIA with prompts | PeopleSoft Technical | 02/02/2012 - 10:07pm |
| Can we create an AE to mass update Position - Jobcode data? | PeopleSoft Technical | 01/18/2012 - 3:11am |
| Pay Components on job data can be defaulted and setup based on the rules? | PeopleSoft Functional | 01/05/2012 - 4:58am |
I've never had any luck trying to do a GROUP BY using the AS name. Try instead specifying the entire DECODE(...) in the GROUP BY. I'm pretty certain that will work.
Larry is right - So Instead of your
--use:
GROUP BY DECODE(PMRTAGGR_AGG.PMR_TRD_EFF_MO_ID,
1,1,2,1,3,1,4,2,5,2,6,2,7,3,8,3,9,3,10,4,11,4,12,4)
Thanks..It Works
Post new comment