Today i am writing new logic to batch insert Staff Leave record since MCO is practice for all my customer.
On a few scenario, i need to find out who has the 0.5 balance in their entitlement balance.
So here i give you the simple code to determine whether the number is Integer or Decimal.
DECLARE @value DECIMAL(10,2) = 7.0 IF FLOOR(@value) <> CEILING(@value) BEGIN PRINT 'Decimal Number' END ELSE BEGIN PRINT 'Integer Number' END GO