Change TRUE FALSE to ON OFF

  • This query results in TRUE or FALSE entries in the VALUE column. Is there a way to report TRUE as ON and FALSE as OFF?

    SELECT substring (TAG , 10,50) as 'ALARM NAME', VALUE,

    CONVERT (CHAR(27),(TIME),109) as 'DATE & TIME'

    FROM dbo.OMRON_1_ALARMS where TIME between @StartDate and @EndDate

    Thanks,

    Gary

  • how about

    ...

    Case when value=0 then 'OFF' else 'ON' end

    ...

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • That did the trick - thanks a million.

    Gary

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply