Skip Navigation

Guess the intent

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

7

You're viewing a single thread.

7 comments
  • Update: The original dev does not remember exactly. However they have said that clientId was originally a VARCHAR, so this may have been checking for both '0' or ''

    So an over-engineered workaround to a bad datatype perhaps?

7 comments