18

Came across a gem today...part of a stored procedure that sits under our erp software. This explains a lot

Comments
  • 0
    SET @@ShowDetail = @ShowDetail ?
  • 2
    ... and if it's 0!?
  • 4
    @ArcaneEye I should finish it with "else set @showdetail = 0" and leave it for the next dev who comes across it
  • 1
    @soohoonigan lol. I would never have guessed that it wasn't initialized to 0...
  • 2
    Not an expert. But won’t this assign force a query plan recompile? If yes, it may be intentional. We are fighting query plans daily, my go to solution is “Optimize for unknown” and in some cases “option recompile”
  • 1
    But what is @showdetail? 0_0

    What r u showing
    Who r u showing
    Where
    Who is detail
  • 2
    @sadgrad19 Whatever it is, it already is itself.
Add Comment