Skip to content
Advertisement

Conditionally convert a decimal value to integer

It is showing a result like this

But I want result like this when type is 1 then result should be in integer format:

on else condition (@Type rather than 1) I want result like this

I have tried this query

Advertisement

Answer

This will work for you.

When @type is 1, the result will be 10 for both values. Otherwise it will be exact value in the table.

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