Tags

, , , , , ,

I found this useful. I have been using different method to find if we have decimals in an amount field.

This method seems to be easy and quick. Below query pulls account details for accounts that have values in 4 decimal places (there are 4 _ in the LIKE expression below)

SELECT ACCOUNT_NO, ACCOUNT_BALANCE
FROM ACCOUNT (NOLOCK)
WHERE ACCOUNT_BALANCE LIKE ‘%.__%’
;

Advertisements