Insert Statement Fails Using NVL Functions After Install of DG4MSQL 11.2.0.1

(Doc ID 1267053.1)

Last updated on NOVEMBER 18, 2010

Applies to:

Oracle Database Gateway for SQL Server - Version: 11.2.0.1 to 11.2.0.1 - Release: 11.2 to 11.2
Microsoft Windows (32-bit)

Symptoms

Using Oracle Database Gateway for MSSQL (DG4MSQL) 11.2.0.1 an insert statement using the NVL functions fails with the error message:


SQL> execute powerfaids.pf_addr_update('2010',30480381);
BEGIN powerfaids.pf_addr_update('2010',30480381); END;
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Driver]Invalid Descriptor Index {07009}[Oracle][ODBC
SQL Server Driver]Insert value list does not match column list {21S01}
ORA-02063: preceding 2 lines from PFAIDS
ORA-06512: at "PROD.POWERFAIDS", line 91
ORA-06512: at line 1


In this case NVL is being used in a procedure -


procedure pf_addr_update(p_award_year_token varchar2, p_contact_id_seq number) is
v_alternate_id varchar2(10) := to_char(p_contact_id_seq); 
v_award_year_token number := to_number(p_award_year_token); 
v_street1 varchar2(30) := null; 
v_street2 varchar2(30) := null; 
v_city varchar2(17) := null; 
v_ssn varchar2(9) := null;

begin

v_street1 := '1 Test Street';
v_street2 := 'Apartment 1';
v_city := 'Albany';
v_ssn := '111221111';
insert into external_data@pfaids
("award_year_token", "ssn", "ALTERnate_id","secondary_add_type",
"secondary_street1","secondary_street2","secondary_city")
values(v_award_year_token, v_ssn, v_alternate_id,'L',
v_street1, nvl(v_street2,'*'), v_city);

end pf_addr_update;


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms