23
Guess the intent (aussie.zone)
submitted 2 months ago* (last edited 2 months ago) by Threen@aussie.zone to c/sql@programming.dev

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

you are viewing a single comment's thread
view the rest of the comments
[-] Threen@aussie.zone 4 points 2 months ago

The client table has around 100,000 rows each with a unique clientId, none of which are returned from the CAST / ABS / SIN

I think you are right and this is a 'fix' for something lost to time. I am going to talk to the original dev tomorrow to see if they remember what it was for

[-] Badeendje@lemmy.world 3 points 2 months ago

Let us know, ya?

this post was submitted on 30 Jun 2024
23 points (100.0% liked)

SQL

450 readers
2 users here now

Related Fediverse communities:

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS