<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/qaudruple-negative-gvjx6zpq7" -->

---
title: Qaudruple Negative | daily.dev
description: A look at a deeply convoluted SQL Server stored procedure condition found in a legacy PowerBuilder application. The codebase spans about a million lines, was...
canonical: https://daily.dev/posts/qaudruple-negative-gvjx6zpq7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Qaudruple Negative | daily.dev
og:description: A look at a deeply convoluted SQL Server stored procedure condition found in a legacy PowerBuilder application. The codebase spans about a million lines, was...
og:url: https://daily.dev/posts/qaudruple-negative-gvjx6zpq7
og:image: https://api.daily.dev/og/posts/GvjX6zPQ7.png
og:image:alt: Qaudruple Negative
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Qaudruple Negative

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 4 min read · 3 upvotes · 0 comments

## Summary

A look at a deeply convoluted SQL Server stored procedure condition found in a legacy PowerBuilder application. The codebase spans about a million lines, was version-controlled with the long-defunct Visual Source Safe, and uses an impenetrable Hungarian notation scheme with prefixes like f_c_f_c_f_c_f_contact. The highlighted code snippet features a quadruple negation pattern — nested NOT EXISTS, CASE WHEN returning 0, and inequality checks — making the actual intent nearly impossible to decipher. The post also covers the chaotic development environment: no source control on the database side, manual deployments to production, and frequent environment drift.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/qaudruple-negative>

## Similar posts on daily.dev

- [Beautiful T-SQL Queries: Three Could Delete the Company](https://daily.dev/posts/beautiful-t-sql-queries-three-could-delete-the-company-ni51yxeeb) · SQL Authority · 36 upvotes · 7 comments
- [Both Ways Bug Me](https://daily.dev/posts/both-ways-bug-me-ixnffblrq) · The Daily WTF · 5 upvotes · 0 comments

---

Tags: [#sql](https://daily.dev/tags/sql), [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server), [#technical-debt](https://daily.dev/tags/technical-debt)

[View this post on daily.dev](https://daily.dev/posts/qaudruple-negative-gvjx6zpq7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Qaudruple Negative","url":"https://daily.dev/posts/qaudruple-negative-gvjx6zpq7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/qaudruple-negative-gvjx6zpq7"},"datePublished":"2026-03-05T12:34:37.013Z","dateModified":"2026-03-05T12:34:58.040Z","description":"A look at a deeply convoluted SQL Server stored procedure condition found in a legacy PowerBuilder application. The codebase spans about a million lines, was...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/qaudruple-negative-gvjx6zpq7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"sql,microsoft-sql-server,technical-debt","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"Qaudruple Negative"}]}
```

