Re: If one item is false, I need a false returning
- From: "m" <m@xxx>
- Date: Fri, 11 Sep 2009 21:48:54 -0400
Based on the subject, all he needs is a where clause with a string of ANDs (or a negative case with ORs) between each thing that he needs to be true. It is better to do it that way because, what is likely wanted, is to make sure that all tests have passed (been authorized) rather than to check if any test failed and so the problem of NULLs, independent of data type and constraint, is eliminated.
This is a case where your ROI (risk of incarceration) modis might be appropriate!
"--CELKO--" <jcelko212@xxxxxxxxxxxxx> wrote in message news:25e2ed15-a815-4de4-973b-2cce6a76d152@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MIN (CAST ( TrailerDefects.auth_assigned AS INTEGER)) AS authed <<
Doesn't that seem convoluted to you?
In some versions of SQL Server, BIT was a bit, then later it was a
numeric; numeric data types (like all SQL data types) are NULL-able.
But the proprietary are not the only reason we avoid using assembly
language/ punch card style bit flags.
SQL is a "predicate language" and not a low-level flag language. We
discover a fact by using a search condition which is always right and
not just when it was set. A ample date of an event lets you follow a
history and enforce business rules. That is we would not have
"auth_assigned_flg" but a "authorization_date" instead.
.
- References:
- SQL: If one item is false, I need a false returning
- From: David
- Re: If one item is false, I need a false returning
- From: David
- Re: If one item is false, I need a false returning
- From: --CELKO--
- SQL: If one item is false, I need a false returning
- Prev by Date: Re: Variable as Alias Name [OT]
- Next by Date: Re: Fix by Cloning table struction
- Previous by thread: Re: If one item is false, I need a false returning
- Next by thread: Re: If one item is false, I need a false returning
- Index(es):
Relevant Pages
|