Discussion board where members can get started with Qlik Sense.
i want to limit the data load from a odbc-datasource.
select * from my_database where my_type = 42.
my_type is of data type integer.
Unfortunately qlik does not take this condition and loads everything.
what is the right syntax for qlik-sense ?
is there a cast or something necessary ?
thx for your hints!
Solved! Go to Solution.
If your having trouble the quotes might work or how about to put your SQL in a view and pass that in.
CREATE VIEW dbo.YourView
select * from my_database where my_type = 42
In your load script
SELECT * FROM dbo.YourView
Id also suggest you name your fields in your select statement so you dont bring in unnecessary data that can cause performance and association issues down the line as your app grows.
Most SQL databases accept the ANSI SQL LIMIT clause:
SELECT * FROM customers LIMIT 1000;
Microsoft SQL Server has it's own proprietary TOP clause that has to come immediately after the SELECT like this:
SELECT TOP 500 * FROM customers;
This is much much better to use than the FIRST prefix for LOAD since obviously the former syntax will prevent a lot of data to be extracted and sent to Qlik before it is discarded by the FIRST prefix....
However you can use it for any type of LOAD like this:
FIRST 100 LOAD * FROM mySheet.xlsx (ooxml......);