error converting datatype nvarchar to bigint
Question
Application Type
Reactive
Service Studio Version
11.11.6 (Build 44614)

Hi,

I need to query the database and have as input for it multiple Id's. I wrote  an SQL-query with an "IN" statement.

It works when testing,  but when running it, it fails with "error converting datatype nvarchar to bigint".

The SQL has an inputparameter ids  which is text where the ids are separated by a comma.  Is there a way to convert the  ids inside my sql-query? 

Help appreciated,

Geert

Solution

Hi,

Check your input parameter by debugging... It should be like 1,2,3,4

Otherwise it will throw error..


Amit Jain




Hi Geert Uyttendaele,

As you mentioned "It works when testing,  but when running it, it fails with "error converting datatype nvarchar to bigint".  so input may not be passed correctly.

can you try with BuildSafe_InClauseIntegerList action and assign the output as a input to the sql.



Regards,

Ellakkiya.S

Solution

Hi,

Check your input parameter by debugging... It should be like 1,2,3,4

Otherwise it will throw error..


Amit Jain




You can refer my test OML. I hope it will work.


Amit Jain






DummyReactiveApp3.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.