Highlighted
Active participant

Business Adapter Import Error - Numeric Values

Hello,

I am trying to add a numeric value within the description field on each Cost Center we have imported previously.

However, I am getting the following error message when I execute the Simulate Action:

"Explicit conversion from data type int to ntext is not allowed."

Has anyone else seen this issue?

Thanks!

- David

0 Kudos
5 Replies
Highlighted
Frequent contributor

Re: Business Adapter Import Error - Numeric Values

Please share your xml (what you can) and sample data.
Is your source a file or is it sql?
When you say add, do you mean concatenate, so you are effectively editing the previous CC value or are you adding a new level to your structure?
Highlighted
Flexera beginner

Re: Business Adapter Import Error - Numeric Values

Hi David,

you get this error message when you try to convert a ntext  field directly into a integer field.

DECLARE @MyTable TABLE ([Description] ntext )

INSERT INTO @MyTable
SELECT '123456789'

This table has one column 'Description' which has the data type = ntext  and the value '123456789'

SELECT CONVERT(INT, [Description] ) from @MyTable 

will return exactly that message. If you convert first into VARCHAR and then to int, that will work.

SELECT CONVERT(INT, CONVERT(VARCHAR(50),[Description]))  from @MyTable

So if you are using a database table as input data for BI, you need to convert this ntext field first into a varchar field. When the content of this column has only digits, then BI will be able to convert this content implicitly into an int and insert into the column which is defined as int.

Sumi

 

 

0 Kudos
Highlighted
Community Manager Community Manager
Community Manager

Re: Business Adapter Import Error - Numeric Values

If you can share the adapter as @Nico_Erasmus has suggested along with a debug log showing the import behavior and failure then that will likely allow a more specific response. However based on the error message I am guessing you will need to arrange for the source data query to bring in the description value as a text value rather than a numeric value - that can probably be arranged with some sort of type cast.

(Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".)
0 Kudos
Highlighted
Active participant

Re: Business Adapter Import Error - Numeric Values

Hi there.

Please share your xml (what you can) and sample data.

"See attached .csv source file and .xml business adapter file."

When you say add, do you mean concatenate, so you are effectively editing the previous CC value or are you adding a new level to your structure?

"I want to update the Description row of the Cost Centers based on the value that is listed in my .csv file."

Thanks!

- David

 

0 Kudos