3939 error

Database
Enthusiast

3939 error

Hi,

I am trying to generate sequences for IDN in teradata table but it is throwing an error like

"393939 error:there is mismatch between number of parameters specified and the number of parameters required"

Teradata query which I used to create sequence.

sel COALESCE(rel_d.SEGMNT_MAIN_REL_TYP_IDN,ROW_NUMBER() OVER( ORDER BY rel_d.SEGMNT_MAIN_REL_TYP_IDN)+CAST(:VAR1 AS DECIMAL(15,0))) SEGMNT_MAIN_REL_TYP_IDN
FROM GL_SEGMNT_MAIN_REL_TYP_I rel_i left outer join GL_SEGMNT_MAIN_REL_TYP_D rel_d
on rel_i.src_sys_id=rel_d.src_sys_id;

Please let me know the reason for this error.
1 REPLY
Enthusiast

Re: 3939 error

Are you defining and setting :VAR1 inside of the macro or stored procedure containing this SQL statement?