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 PROTECTED]