Hehe David. =)
----- Original Message -----
From: "David L. Penton" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 6:15 AM
Subject: RE: Help with SQL and combining boolean fields with OR
> For SQL Server, | is the Or operator:
>
> SELECT
> "PK_ID",
> "Name",
> "Borough",
> ("Sat_Std" | "Sat_Other") as "Open_Sat",
> ("Sun_Std" | "Sun_Other") as "Open_Sun",
> "Postcode"
>
> FROM "dbo"."LOH_Buildings"
>
>
> David L. Penton, Microsoft MVP
> JCPenney Application Specialist / Lead
> "Mathematics is music for the mind, and Music is Mathematics for the
> Soul. - J.S. Bach"
> [EMAIL PROTECTED]
>
> Do you have the VBScript Docs or SQL BOL installed? If not, why not?
> VBScript Docs: http://www.davidpenton.com/vbscript
> SQL BOL: http://www.davidpenton.com/sqlbol
>
>
> -----Original Message-----
> From: Nick Middleweek [mailto:[EMAIL PROTECTED]]
>
> Hello,
>
> I've got this SQL statement (that doesn't work)
>
> SELECT PK_ID,
> Name,
> Borough,
> (Sat_Std OR Sat_Other) as 'Open_Sat',
> (Sun_Std OR Sun_Other) as 'Open_Sun',
> Postcode
>
> FROM LOH_Buildings
>
>
> I've got two fields that represent both Sat and Sun.
>
> I want to return one column that indicates whether either or both fields
are
> True.
>
> Can I do this?
>
>
> Thanks,
> Nick
>
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
>
>
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]