1). Modify the query as per the values in the data source like the following:
SELECT {option IGNORE_TRAILING_SPACES="False", CASE_SENSITIVE="True" }
*
FROM
/shared/"ViewName"
The values for flags “IGNORE_TRAILING_SPACES” and “CASE_SENSITIVE” should match the values you see in the data source, .e.g., if the values in datasource created for these flags are IGNORE_TRAILING_SPACES="False", CASE_SENSITIVE="True" , then the values in the query should be same.
2). Modify the configuration setting for Case Sensitivity and Ignore trailing spaces from Administration >> Configuration >> TDV Server >> SQL Engine >> SQL Language same as that is set in your data source.
Once the configuration settings are modified , go to the data source and refresh the Resource capabilities to apply the changes and then try to run the SQL again.