Run an ADHOC Query in an SQL Stored Procedure
I feel like I must be missing something simple that I just cannot see. I need to run an ADHOC query that was built in the CRM interface in SQL code, but I need access to all of the output fields, not just the IDSet for the query.
I know there is some way to do this, but I can't seem to figure it out, can someone point me in the right direction?
Comments
-
@James Huff Hi James - I brought your question to a couple of our subject-matter experts, and they indicated we need a little more information in order to provide a useful answer - we have asked your CSM to reach out to get some more details. You should hear from her tomorow. Thanks!
0 -
@James Huff the only way I can think of to do this would be to create the query and then copy the SQL into an SDK stored procedure spec. As you mentioned when you create a selection only the ID column is committed to a table in the database, and as ad-hoc queries don't create a database object like a view etc there isn't anything for you to reference in a stored procedure. Hope that helps.
0 -
@James Huff One way you might be able to get what you're looking for is to save the query as a User-Defined Data List from the ad-hoc query editor. The query and data list fork into separate objects at that point, but it does create a SQL stored procedure that returns all of the fields.
e.g., EXEC [USP_DATALIST_ADHOCQUERY_00000000_0000_0000_0000_000000000000]
1
Categories
- All Categories
- 6 Blackbaud Community Help
- 209 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 359 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 563 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.7K SKY Developer
- 243 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)

