I am one of the developers on a very small team and have just found the following query

I would love to hear your ideas for what you think was being attempted here!

SELECT ... FROM client WHERE CAST(ABS(SIN(clientId)) AS BIT) = 0

  • Threen@aussie.zoneOP
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    I forgot to mention this is in SQL Server, so SIN operates on radians. So I THINK this can only ever cast to a 0 when clientId is also 0

    It certainly doesn’t for any of the 100,000 existing rows