Skip to content

100% utilised bug with decimal(10,8) #2

@tdesmaele

Description

@tdesmaele

Found that changing the Decimal(10,8) to Decimal(20,8) fixed an issue I was having in this script when encountering an index range at 100%.

CASE
WHEN Max_Value > 9999999999999999999999999999999999999 THEN NULL
ELSE
CAST(
CASE WHEN (Increment_Value > 0)
THEN (100)(1.0-(CAST(Max_Value-Last_Value AS FLOAT)/CAST(Max_Value-Seed_Value + 1.0 AS FLOAT)))
ELSE (100)
(1.0-(CAST(Min_Value-Last_Value AS FLOAT)/CAST(Min_Value-Seed_Value + 1.0 AS FLOAT)))
END AS DECIMAL(20,8))
END AS [Current_Inserts_Used_Pct]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions