Ben S. submitted the following piece of SQL. It's only a few lines of code, but both the variable names and values are a bit... curious.

I can only imagine what context this code appeared in, or what the author was trying to achieve. What do you think?


DECLARE @Online varchar(100)
DECLARE @Offline varchar(100)

IF @OnlineOffline = 'Both'
    SET @Online = 'Y'
    SET @Offline = 'N'

IF @OnlineOffline = 'Y'
    SET @Online = 'Y'

IF @OnlineOffline = 'N'
    SET @Offline = 'N'


[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!