What is a SQL error and how can I remove it?


The "SQL is not ready" error is a generic error that WebI presents when it does not have a specific description of an error it is experiencing. It can be quite difficult to narrow down the specific cause.

If the error occurs prior to the refresh prompt, causes in Group A are more likely.
If the error occurs after the report has been refreshed, causes in Group B are more likely.
When testing for an error, be sure to follow these steps:

1. Make changes to the report
2. Save the report
3. Close the report completely
4. Rerun the report in View mode (do not edit or “Modify” when opening)

If the SQL error does not return, you have resolved the problem. If it does, continue looking for issues following these guidelines. Please contact customer support if you need more information or additional assistance.

Group A:

Potential Cause: Requery source that returns NULL data
Solution: Reconstruct the filtering so that some data returns, ensuring that the requery data retrieval is not NULL.

Potential Cause: Incompatible filters in a query (for example the Caseload Filter with a Touchpoint filter)
Solution: Remove one filter at a time and run again. If there is an incompatibility, register this with Support.

Potential Cause: Null simple filter
Solution: When the simple filter has been enabled, ensure the object in place returns some values (no NULL value).

Potential Cause: Multiple changes to the query structure of the report including deleting/adding queries, changing result objects, etc.
1) Take a screenshot of the query build.
2) Find the XXX “remove query” icon located to the far right within the query window pane. This will remove all objects from the query and clear any caching.
3) Reconstruct the query as seen in the image you took.
4) Follow instructions for testing the fix.

Group B:

Potential Cause:
Use of variables that combine elements from different queries without appropriate merging
Solution: While Webi typically disallows this type of construction, loopholes exist in which it can still occur. A table should only contain either objects from a single query, objects from a single query combined with merged objects/details, or merged objects and details only.
Be sure that you have merged dimensions (typically, [Subject Unique Identifier], [Participant Site Identifier] or [Response ID]). Each of these has a companion object that it can be merged with.

Potential Cause: Too much or incorrect relative positioning
Solution: Relative positioning is used to position one table or block “relative” to another one or to the top, bottom, or sides of the report or section. Too many of these can cause page corruption. Also, blocks which are all positioned relative to the top or bottom of the report or section is problematic. Be sure to position blocks relative to the objects directly around it rather than relative to the top of the page.

Potential Cause: Formulas that don't match a WebI syntax
Solution: While WebI may accept formula syntax that is not specified in the Help Manual, this has been known to cause SQL errors. Be sure to check the Help Manual from the variable editor (click on the function, then “More on this Topic” button) to ensure you are using the recommended syntax.

Group A or B
No identified cause:
If you cannot narrow down the error, we recommend rebuilding the report, checking for errors after each addition to the Report Objects and Query filter.

Did this answer your question?