Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: SQL Select ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 11026 of 11409
Post > Topic >>

Re: SQL Select All Items where one meets the criteria

by "Plamen Ratchev" <Plamen@[EMAIL PROTECTED] > May 8, 2008 at 01:20 PM

Here is one way:

SELECT P.people_code_id, G.giving_amount, G.fiscal_year 
FROM People AS P
JOIN GivingSummary AS G
  ON P.people_code_id = G.people_org_code_id
WHERE EXISTS (SELECT * 
                     FROM GivingSummary AS G2
                     WHERE G2.people_org_code_id = G.people_org_code_id
                         AND G2.giving_amount >= 500 
                         AND G2.fiscal_year <> '');


HTH,

Plamen Ratchev
http://www.SQLStudio.com
 




 4 Posts in Topic:
SQL Select All Items where one meets the criteria
ckauvar@[EMAIL PROTECTED]  2008-05-08 09:05:55 
Re: SQL Select All Items where one meets the criteria
"Plamen Ratchev"  2008-05-08 13:20:44 
Re: SQL Select All Items where one meets the criteria
ckauvar@[EMAIL PROTECTED]  2008-05-08 11:17:34 
Re: SQL Select All Items where one meets the criteria
"Plamen Ratchev"  2008-05-08 16:24:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:52:25 CDT 2008.