Open LMS has an SQL editor from which you can run queries on the database. To access the SQL editor, use your administrator credentials and access the system home page. From there, click the gear icon in the upper-right corner and click Home page settings > Reports > SQL Administrator.
Write or paste the SQL code in the designated box and click Generate report. The results of the query will appear at the bottom of the page in a paginated table, and you can download them by selecting either CSV or XLS under Export.
You can save the query for later use by assigning it a name and clicking Save query. In the future, you can retrieve saved queries using the Saved queries button.
Remember that queries are personal, so if you save them as user01, you can retrieve them only if you use that same user.
Why am I receiving an "Async call failed" error in SQL queries?
In some cases, SQL queries run from Admin SQL finish without results and with an Async call failed error.
This error occurs when the calculation to be performed becomes too complex. In cases where it fails, the best option is to run the query using deferred reports, which can be configured on the home page, under the gear icon, at Home page settings > Reports > Deferred administration SQL.
Click the +, enter the name under which we want to save it, and paste the query. Run it by clicking Save and run and wait for it to complete.
You can retrieve the results of the deferred query later from the same location (Download button), run it again, edit it, or delete it.
Comments
0 comments
Please sign in to leave a comment.