You can translate the question and the replies:

Error saving view: Syntax Error: Exception parsing query near '*'

Hello, I am working through the lab LAB Create an Aggregation View (DEN80EDU12D08LAB01). When I get to step 5 Specify a where condition to filter the data using those parameters: to_localdate('yyyy-MM-dd''T''HH:mm:ss', bv_sales_all.saledate) between start_date AND end_date and try to save, it prompts the subject error Error saving view: Syntax Error: Exception parsing query near '*' Parameters: start_date: localdate to_localdate('yyyy/MM/dd', '1970/01/01'), end_date: localdate cast('localdate', now()) where clause: to_localdate('yyyy-MM-dd''T''HH:mm:ss', bv_sales_all.saledate) between start_date AND end_date
user
04-02-2022 13:03:22 -0500
code

1 Answer

Hi, I have followed the same steps in my environment as suggested in the LAB (DEN80EDU12D08LAB01), and it works fine. I performed the following steps, in order to save and run the aggregation view **iv_employee_sales** successfully: * I added two view parameters (**start_date & end_date**) in the selection view (**iv_employee_sales**) and gave the default value as **to_localdate('yyyy/MM/dd', '1970/01/01')** & **current_date()** to the corresponding parameters. * Then, added a WHERE clause as below, * to_localdate('yyyy-MM-dd''T''HH:mm:ss', bv_sales_all.saledate) between start_date AND end_date * In the Group By tab, add the **employeeid** field. * Finally, in the Output tab, I have added two new aggregated fields, and added the respective Field expressions as below, * total_sales as count(*) * total_price as sum(cast('int', bv_sales_all.totalprice)) Upon verifying and performing the above steps, I’m able to save & run the view **iv_employee_sales** successfully. Besides this, I also received the error **Exception parsing query near ‘\*’**, when the incorrect syntax is provided in the Field expression for the aggregation fields (**total_sales, total_price**). So, I recommend to verify the expressions provided in the **aggregation fields**, as suggested in the LAB, in order to avoid any syntax errors. For more information, you can refer to the sections [**Creating Derived Views**](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_derived_views) and [**Creating Selection Views**](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views#creating-selection-views) of Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
08-02-2022 04:04:27 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here