Skip to Content
author's profile photo Former Member
Former Member

character set mismatch error while using cast function in IDT

Hi ,

Could you please help on this issue . I am trying to use the cast function to convert number varchar in Information design tool .

But it is throwing error message character set mismatch.

Thanks & Regards

Venkat

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 04, 2013 at 10:04 AM

    Are you using multiple objects / columns in the expression, in that case you will have to CAST the other related columns too, else there will be a mismatch in the datatype hence the error.

    Let me know if this helps.

    Sujit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2013 at 01:21 PM

    Make sure ou set the datatype of the object as Char before converting it

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 02:22 PM

    What is you syntax? Could you share it so that we may help you better?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi ,

      I am using correct syntax and its parsing correctly at universe level but while trying to see the value its throwing character mismatch error .

      At table level the column (column name as version name) data type is nvarchar . It contains the value like V0 , xyz, abc .. etc. I need display 000 instead of V0 value .

      so I am using the below code to convert V0 to 000

      case when version='V0' then cast('000' as varchar) else version end .

      Thanks

      Venkat

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.