on 11-07-2012 2:19 PM
Hi
I am trying to create a SQL script based calculation view with below sample query
select 10 top * from sales group by region, amount
If I execute this query in SQL editor it returns only 10 rows as expected
But if use the same query and create calculation view and use Data Preview option, it returns more rows e.g in my case 5000 as Max row count is set to 5000
Is this limitation in Calculation view or Max Row count has precedence over the row count returned in the query?
Thanks
You could try to use SELECT * FROM TABLE LIMIT N [OFFSET M] syntax instead.
If necessary, use the ORDER BY statement (prior to the LIMIT statement) so you get the desired records.
Check the HANA reference for more details: http://help.sap.com/hana/html/sql_select.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
One quick question.
Is your query in the Calc view "select TOP 10 * ...".
When you do the data preview, the generated Query adds TOP clause based on the no of rows displayed setting for data preview. You can check the query in Information / View Log next to data preview button.
Please confirm.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Did you try executing select * from the Calc view directly, with your calc view containing TOP 10 clause.
In this case, TOP N from data preview will not come in picture. As you know, data preview is just another feature for data checking. I personally don't use it as it selects all columns and performs a group by with all columns.
The practical use of the Calc view using any reporting tool may generate a different query.
Regards,
Ravi
Hi Ravi,
I already executed the calc view as mentioned, having Top 10 clause...
It doesn't works.
My only concern is if I create BO exploration view on the Calculation view, will it fetch 10 records or all? I tried creating BO explorer on Cal view and it seems that it pulls up all records
Thanks,
Nikhil
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.