INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

TeraJDBC 14.00.00.13] [Error 3706] Syntax error: expected something between '(' and the 'substr' key

TeraJDBC 14.00.00.13] [Error 3706] Syntax error: expected something between '(' and the 'substr' key

TeraJDBC 14.00.00.13] [Error 3706] Syntax error: expected something between '(' and the 'substr' key

(OP)
Receive the following error:
[Error Code: 3706, SQL State: 42000] [Teradata Database] [TeraJDBC 14.00.00.13] [Error 3706] [SQLState 42000] Syntax error: expected something between '(' and the 'substr' keyword.

SQL:
SELECT
i.cof_clnt_nbr_id AS CLNT_NBR,
i.cof_cmpny_nbr_id AS CO_NBR,
concat(substr(d.prsn_ssn_nk,0,4), '-', substr(d.prsn_ssn_nk,4,2),'-', substr(d.prsn_ssn_nk,6,4)) AS MAKER_SS,
concat(substr(i.cof_acct_nbr_id,0,4), '-', substr(i.cof_acct_nbr_id,4,2), '-', substr(i.cof_acct_nbr_id,6,13)) AS ACCT_NBR,
d.d_full_nm AS BUS_NM,
d.addr_ln_1 AS ADDR_1,
d.addr_ln_2 AS ADDR_2,
d.addr_city AS CITY,
d.addr_st AS ST_CD,
d.addr_zpcd AS ZIP_CD,
i.cof_lst_repo_dt AS REPO_DT,
i.cof_orig_chgoff_prin_am AS BOX_2_PRIN_OS,
i.cof_sale_procd_am as BOX_4_SALE_PRICE
'YES' as BOX_5_WAS_BORR_LIABLE,
concat(h.veh_yr_nk , '' , h.veh_mk_desc_nk, '', h.veh_mdl_desc_nk) as VEH_DESC
FROM
V_WOFDWVW.V_INT_retl_loan_curr a,
V_WOFDWVW.INT_retl_cust_brdg c,
V_WOFDWVW.INT_prsn d,
V_WOFDWVW.INT_VEH g,
V_WOFDWVW.INT_VEH_MK_MDL h,
V_WOFDWVW.INT_RECOV i
WHERE
a.retl_sk = c.retl_sk
and a.retl_sk = i.recov_sk
and c.prsn_sk = d.prsn_sk
and a.veh_sk = g.veh_sk
and g.veh_mk_mdl_sk = h.veh_mk_mdl_sk
and (a.retl_acct_stat_cd = 3 or a.retl_acct_stat_cd = 4)
and i.cof_chgoff_rsn_cd in ('IR','CR','UR','VR')
and a.retl_clss_cd = 4
and c.prsn_type_in = '3'
and i.cof_lst_repo_dt >= cast('20140101' as date format 'YYYYMMDD')
and i.cof_lst_repo_dt < cast('20150101' as date format 'YYYYMMDD')
and i.cof_sale_procd_dt is not null
and c.dw_end_dt = cast('99991231' as date format 'YYYYMMDD')
ORDER BY 1

Do not understand why I am getting this message when my colleague sent to me and runs it just fine.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close