Need to concatanate data types "DT_WSTR" and "DT_NTEXT"

  • 21Views
  • Last Post 06 April 2020
  • Topic Is Solved
0
votes
Brian Price posted this 30 March 2020

Trying to concatanate "DT_WSTR" and "DT_NTEXT" in to a single DT_NTEXT field via an expression. but get the following error.

The data types "DT_WSTR" and "DT_NTEXT" are incompatible for binary operator "+". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.

Is there a operator to convert the DT_WSTR sting to text within the expression for my purposes?

The expression is 

Id + " " + Body

id (DT_WSTR)

Body (DT_NTEXT)

 

 

 

Order By: Standard | Newest | Votes
1
votes
Dmitriy Muzurov posted this 31 March 2020

Hello Brian,

Thank you for submiting a ticket with us.

Please try this expression:

(DT_WSTR,20)Id + " " + (DT_WSTR,50)Body

Make sure to specify numbers in the brackets that can accomodate the number of characters from your columns.

We are looking forward to hearing from you, should you have any questions.

  • Supported by
  • Brian Price
0
votes
Brian Price posted this 06 April 2020


Thanks!   That did the trick

Close