OR Condition help

Last Post 19 Aug 2008 10:35 AM by SwePeso. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
charbaugh
New Member
New Member

--
19 Aug 2008 07:43 AM
I'm creating a query with an "or" and only want one of the records returned and not both if the conditions equal true.

select * from apples where type="Old Apples" or type="New Apples", if the type has both old apples and new apples I only want it to return one and do not care which
SwePeso
New Member
New Member

--
19 Aug 2008 10:35 AM
SELECT TOP 1 *
FROM Apples
WHERE Type IN ('Old Apples', 'New Apples')


Acceptable Use Policy
---