Skip to content
Advertisement

Set prefix in SQL CASE expression

I have problem setting a prefix in a case statement.

Data set:

When I run this query my result is this:

Desired result is this:

As one can see, the first zero is not shown in the result. How can I achieve this?

Advertisement

Answer

CASE expression would always return one type so, you need to do conversion:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement