The implicit conversion of the nvarchar data type to varbinary is not allowed

Highlighted
Six Stars

The implicit conversion of the nvarchar data type to varbinary is not allowed

Hi Alll;

i have problem to isert constant value (200) in colum type object .

i put it in the context but when i run job i have this problem :

The implicit conversion of the nvarchar data type to varbinary is not allowed. Use the CONVERT function to execute this query.

 

Best regards

Highlighted
Employee

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

Hi,

 

  Could you please refer below community post and let us know whether it helped you?

 

https://community.talend.com/t5/Design-and-Development/PLEASE-HELP-MS-SQL-Server-varchar-change-to-v...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Highlighted
Six Stars

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

@nikhilthampi 

Tank you for your quick answers 

i try with your solution but not result, same problem . .Are you have other idea.

 

Highlighted
Eleven Stars

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

@hechmi  Why donot you read it as String instead of Object ?

Regards
Abhishek KUMAR
Highlighted
Six Stars

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

@akumar2301 

IN output table DB have type object 

i want fix DRA=200 and CRA=0

 

draoutput.JPG

When i insert direct in tmap i have this result in output table 

CRA                DRA

0x00000000   0x00000000
Best regards

 

 

Highlighted
Eleven Stars

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

Try to read context as String , then before inserting in you table Convet it in byte[]
yourstring.getBytes()
Give a try . Not sure if this will help.
Regards
Abhishek KUMAR
Six Stars

Re: The implicit conversion of the nvarchar data type to varbinary is not allowed

 The implicit conversion of the nvarchar data type to varbinary is not allowed

 

IN output table DB have type object 

i want fix DRA=200 and CRA=0

 

draoutput.JPG

When i insert direct in tmap i have this result in output table 

CRA                DRA

0x00000000   0x00000000
Best regards

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog