I have a below case statement need to be done correcting.
CASE [HourMinuteCompletedtime_res]
WHEN 0 THEN [HourMinuteCompletedTime_rem]
ELSE '+'[HourMinuteCompletedtime_res][HourMinuteCompletedTime_rem]
END
Should be as
CASE [HourMinuteCompletedtime_res]
WHEN 0 THEN [HourMinuteCompletedTime_rem]
ELSE '(+[HourMinuteCompletedtime_res])'[HourMinuteCompletedTime_rem]
In order to properly answer your question, in the future please tell us what the fields are (including their data type) and what your expected result is.
Assuming res and rem are integers, and you want your output to be: (+res) rem
Use:
CASE [HourMinuteCompletedtime_res] WHEN 0 THEN STR([HourMinuteCompletedTime_rem]) ELSE "(+" + STR([HourMinuteCompletedtime_res]) + ") " + STR([HourMinuteCompletedTime_rem]) END
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.