Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Limiting SQL load in script to improve performance

To improve the performance of the load script I wan't to partially load the new data from the SQL database and the old data from QVD files. Is there way to terminate a SQL load based on a certain treshold. In the example below the while statement is not working but gives an idea into what I want to achieve.

LOAD BookInventoryID

    WHERE BookInventoryID < 50000;

SQL SELECT BookInventoryID

WHILE BookInventoryID < 50000       //Statement to terminate SQL load when boundary is reached

FROM DPAR.dbo.BookInventory

ORDER BY BookInventoryID ASC;     //Order records ascending so only first part of the data is evaluated

If you think this is not possible please reply so I can try something different. Thanks!

1 Solution

Accepted Solutions
nagaiank
Valued Contributor III

Limiting SQL load in script to improve performance

Try this

SQL SELECT BookInventoryID

FROM DPAR.dbo.BookInventory

WHERE BookInventoryID < 50000

ORDER BY BookInventoryID ASC; 

2 Replies
nagaiank
Valued Contributor III

Limiting SQL load in script to improve performance

Try this

SQL SELECT BookInventoryID

FROM DPAR.dbo.BookInventory

WHERE BookInventoryID < 50000

ORDER BY BookInventoryID ASC; 

Not applicable

Limiting SQL load in script to improve performance

Thanks! This reduces it significantly!

Community Browser