Connecting Tech Pros Worldwide Help | Site Map

Re: SQL0104N An unexpected token error

  #1  
Old October 28th, 2008, 02:45 PM
Tonkuma
Guest
 
Posts: n/a
You should format your code to understand what you wrote as your code.
Following is my favolit way of formatting.
I found a syntax error in the SELECT list by looking into this
formatted code.
,tab3 as (
select k2.*
, value(at.odp_fee_am,0) as odp_fee_am
, value(at.odp_int_am,0) as odp_int_am
, value(at.tot_tracked_uloc_bp_trans_ct,0) as
tot_tracked_uloc_bp_trans_ct
, value(at.tot_tracked_uloc_bp_trans_am,0) as
tot_tracked_uloc_bp_trans_am
, value(at.tot_tracked_uloc_rp_trans_ct,0) as
tot_tracked_uloc_rp_trans_ct
, value(at.tot_tracked_uloc_rp_trans_am,0) as
tot_tracked_uloc_rp_trans_am
, value(at.tot_uloc_trans_am,0) as tot_uloc_trans_am
, value(at.tot_uloc_trans_ct,0) as tot_uloc_trans_ct
, value(at.tot_tracked_uloc_chq_trans_ct,0) as
tot_tracked_uloc_chq_trans_ct
, value(at.tot_tracked_uloc_chq_trans_am,0) as
tot_tracked_uloc_chq_trans_am
, value(tot_tracked_uloc_bp_trans_ct,0)
+ value(tot_tracked_uloc_rp_trans_ct,0)
+ value(tot_tracked_uloc_chq_trans_ct,0) as
total_tracked_uloc_tran_ct
, value(tot_tracked_uloc_bp_trans_am,0) as
tot_tracked_uloc_bp_trans_am
+ value(tot_tracked_uloc_rp_trans_am,0)
+ value(tot_tracked_uloc_chq_trans_am,0) as
total_tracked_uloc_tran_am
from tab2 k2
left join
cap_acct_trans_stage at
on k2.cust_id = at.cust_id
and k2.efectv_dt = at.efectv_dt
)
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL - Unexpected Token "date/interval" UnixSlaxer answers 3 November 12th, 2005 10:56 AM
SQL0104N on insert of consecutive NULLs Mark McNary via DBMonster.com answers 2 November 12th, 2005 10:29 AM
SQL0104N An unexpected token "END-OF-STATEMENT" was found Najm Hashmi answers 1 November 12th, 2005 10:00 AM
SQL0104N in Command Center - Interactive Breck Carter answers 4 November 12th, 2005 08:18 AM