On Wed, 28 Aug 2002, Tom Haddon wrote:
> Hi Folks,
>
> I am having troubles with a case statement in that I want to have the query
> select only those records that match a particular case. Here's my query:
>
> SELECT
> agency_contact_info.id,organization,department,city,state,description_of_ser
>
Hi Folks,
I am having troubles with a case statement in that I want to have the query
select only those records that match a particular case. Here's my query:
SELECT
agency_contact_info.id,organization,department,city,state,description_of_ser
vices, CASE WHEN agency_contact_info.id > 0 THEN 0 EL
On Wed, 31 Jul 2002, Tom Haddon wrote:
> Hi Stephan,
>
> I have a lot of fields, so I'm not sure if a function or case is the way to
> go. Basically, I have, say 50 boolean fields that are being evaluated, and I
> want to have a column which is the sum of the number of "TRUE" values of
> those 5
t; in any case.
>
> Thanks, Tom
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Stephan Szabo
> Sent: Wednesday, July 31, 2002 4:17 PM
> To: Tom Haddon
> Cc: [EMAIL PROTECTED]
> Subject: Re: [SQL] Case State
uilt in any case.
Thanks, Tom
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stephan Szabo
Sent: Wednesday, July 31, 2002 4:17 PM
To: Tom Haddon
Cc: [EMAIL PROTECTED]
Subject: Re: [SQL] Case Statement
On Wed, 31 Jul 2002, Tom Haddon wrote:
> Hi
On Wed, 31 Jul 2002, Tom Haddon wrote:
> Hi Folks,
>
> Pretty basic one here. I'm trying to do a SELECT statement that includes a
> CASE structure that will be used in the ORDER BY clause, and I want the CASE
> structure to evaluate a bunch of criteria and in each case increment its
> value by a
Hi Folks,
Pretty basic one here. I'm trying to do a SELECT statement that includes a
CASE structure that will be used in the ORDER BY clause, and I want the CASE
structure to evaluate a bunch of criteria and in each case increment its
value by a certain amount:
SELECT id, description CASE