RUN SQL QUERY

Database
N/A

RUN SQL QUERY

Hi all i am new to TERADATA....I have an issue here.....Unable to run the following query.

Giving error : Expected some thing like a name or a unicode delimited identifier of an UDFCALLNAME keyword between ')' and ';'

Any one help me resolve this issue

SELECT starting_balance,
balance_transfer_credits,
employer_contribution,
mtd_inctv_earned_tot,
othr_incntv_amt,
dw_rptg_rlovr_amt,
pos_adjustment_amount,
acct_tot_add_amt,
forfeitures,
neg_adjust_amount,
acct_tot_fund_amt,
claims_paid,
total_substractions,
ending_balance
FROM (SELECT SUM(blnc_trnsfr_crdt_amt) balance_transfer_credits,
SUM(empr_cntrbn_amt) employer_contribution,
SUM(othr_incntv_amt) othr_incntv_amt,
SUM(dw_rptg_rlovr_amt) dw_rptg_rlovr_amt,
0 pos_adjustment_amount,
0 acct_tot_add_amt,
0 forfeitures,
0 neg_adjust_amount,
0 acct_tot_frftr_amt,
0 acct_tot_fund_amt,
0 claims_paid,
0 total_substractions
FROM CDHP_ENT_ALLPHI.UTIL_SMRY a
WHERE substr(fsa_grp_nbr,1,6) = '213011'
AND bnft_typ_cd = 'FMIA'
AND plan_year_bgn_elgblty_dt <= CAST('30/04/2011' AS DATE FORMAT 'DD/MM/YYYY')) x,
(SELECT 0 starting_balance,0 ending_balance
FROM CDHP_ENT_ALLPHI.UTIL_SMRY a
WHERE substr(fsa_grp_nbr,1,6) = '213011'
AND bnft_typ_cd = 'FMIA')

Regards,
Saroop.
2 REPLIES
Senior Apprentice

Re: RUN SQL QUERY

Hi Saroop,
you need to name the Derived Table/Inline View, only Oracle allows to omit the name in some cases :-)

AND bnft_typ_cd = 'FMIA') AS x

Dieter

Re: RUN SQL QUERY

ah HA! That helps ME tremendously! Glad I kept looking for an answer to a similiar situation!

Thanks!!