Skip to Content

Conversion failed when converting the varchar value 'March 31' to data type int.

Hi Guys,

I have a problem here where i am trying to achieve the following in IDT:

Column : Quarter (data type numeric coming from backend sql server)

Custom Column C:Quarter Names:

Case when quarter='1' then 'March 31' else quarter END

but i am getting the error "Conversion failed when converting the varchar value 'March 31' to data type int."

I want that if the quarter is 1 then display March 31

2=June 30

3=Sept 30 etc....

Please help.

Thanks

Vaibhav

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on May 24 at 06:55 AM

    I Got it solved my modifying the statement as :

    case when dbo.RESEAOutcomes.Quarter=1 then 'March 31' when dbo.RESEAOutcomes.Quarter=2 then 'June 30' when dbo.RESEAOutcomes.Quarter=3 then 'September 30' when dbo.RESEAOutcomes.Quarter=4 then 'December 31' else cast(dbo.RESEAOutcomes.Quarter as varchar(10)) end 'Name'

    Add a comment
    10|10000 characters needed characters exceeded

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.