SQL – How do I get only the numbers after the decimal?

How do I get only the numbers after the decimal?

Example: 2.938 = 938


Answer

one way, works also for negative values

declare @1 decimal(4,3)
select @1 = 2.938

select PARSENAME(@1,1)

Leave a Reply

Your email address will not be published. Required fields are marked *