Write Your Own Questions
Once you understand the SQL behind a question, you can create one!
- Make sure you understand Transact-SQL (T-SQL), which is different from the SQL-like conventions in MinistryPlatform.
- Make sure you have access to the database server.
Your question displays in the list of Ministry Questions.
Discontinue a Question
If a question is no longer relevant to your ministry needs, we recommend discontinuing it rather than deleting the question record. This way, you can keep all the historical data in case it becomes relevant again in the future. To do this, edit the question record, and set Discontinued to "Yes".
Update Your Data
A stored procedure runs every night to calculate the answers to your questions. But if you need to test a question you've written, you don't have to wait. You can manually run the stored procedure from Management Studio. This regenerates answers to all existing questions, going back the number of weeks specified. For new questions, the procedure recognizes that there is no data, so it will start from the Answer Starts After date and generate weekly data from then until now.
To run the stored procedure, use this call:
EXEC dbo.service_ministry_QA_insert_answers 1
Want to see some cool SQL stuff? You can look at (but do not change) any of the service_ministry_QA_ stored procedures.