Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Convert type in sql or jasper i report

Kaustubh Sharma
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi .......

in my sql query i want to change bit type 0 or 1 in values 'Yes' or 'No' but while runnig query below I am getting

Error: Conversion failed when converting the varchar value 'No' to data type bit.

Query:select case casedetails.[re-openindicator] when 1 then 'Yes' when 0 then 'No' else casedetails.[re-openindicator] end from casedetails

Well I am also passing this query to Jasper I report but there also it is converting it into boolean values false or true but I want it as Yes or No...

looking for a sharp Brain to solve my problem ..... please help me out to convert it any side(jasper i report or in sql query)

Thanks in Advance

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic