Database query is adding unwanted dates
I am trying to run a gift query on two specific funds for this calendar year. I have the funds listed in the criteria and this calendar year as the gift date. It keeps pulling older dates as well. I have tried to use <ask>, between, and equals- All of which return the same results. My Output has Name, Gift Amount, and Date. What am I doing wrong? I found the workaround, by pulling the gift list in webview and then making the changes I needed in database view, but shouldn't this query work in database view?
Comments
-
@Melissa Duffy It would be helpful if you could share a screenshot of your query criteria.
Are you using ( ) around the funds with an OR condition?
2 -
@Melissa Duffy
yea you need some paranthsis for the logic to work properly.What you currently have is basicaly saying: give me any gift that is between 1/1/2024-10/16/2024 and have fund id 16. OR fund id 21 without criteria on gift date.
instead you need to put open paranthesis on fund id 16 and close parantheiss on fund id 21
gift date between 1/1/2024-10/16/2024
AND ( fund id equals 16
OR fund id equal 21 )
------------------------
OR you can just do
gift date between 1/1/2024-10/16/2024
AND fund id one-of 16 , 21
2 -
@Melissa Duffy Try adding a ( before AND Fund and ) after equals 21.
Helpful tip I learned is when using a combo of AND and OR you generally want to use ( ). Everything outside of the ( ) applies to all desired results.
1 -
@JoAnn Strommen Thank You!
0 -
@Alex Wong Thank you! I couldn'tfigure out how to add the (), so I used the one of and it worked perfectly! Appreciate the help!
0 -
@Melissa Duffy
it will be useful in the future, read how to here:0
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 358 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 562 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 779 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)



