Regon
Regon

Reputation: 392

Error converting data type varchar to float (SQL to oracle linked Server)

enter image description here

Sample Data to upload is here

Same data is uploading successfully from another server. What might be the reason behind it ???

Upvotes: 0

Views: 549

Answers (1)

Littlefoot
Littlefoot

Reputation: 142705

What are your thousand and decimal separators set to? Check them by running the following statement:

SQL> select * From v$nls_parameters
  2  where parameter = 'NLS_NUMERIC_CHARACTERS';

PARAMETER                      VALUE
------------------------------ ----------
NLS_NUMERIC_CHARACTERS         ,.

It says that - in my database - a comma is a decimal character, while a dot is a thousands separator. For example:

SQL> select 5/2 result from dual;

    RESULT
----------
       2,5

So, if your source data contain separators different from your settings, that might lead to an error. In Oracle, you'd fix it as

SQL> alter session set nls_numeric_characters = '.,';

Session altered.

SQL> select 5/2 result from dual;

    RESULT
----------
       2.5

Though, message you posted isn't standard Oracle ORA-xxxxx error message so you might need to fix it on "that" side (i.e. not on the Oracle side).

Upvotes: 1

Related Questions