Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

andriesb
Not applicable

conditional load first 100 records for debugging

I did find the discussion at http://community.qlik.com/message/70809#70809 but this will fail to work for me : My code is reading through odbc:

MyTable:

First 100

Load

field1,

field2;

Sql SELECT *

FROM  "My_Table"

where "My_Table".code = 'abc'

Although the 'first' statement is set to 100 it still (I presume through the sql statement) loads all 4milj records.

What would be the best solution to be able to set a global variable 'debugging' to e.g. true or false (or a number) : depending on this variable the load shouls only be perfomed on the first 100 records.

Any best practive examples are welcome.

P.s. I did notice the debudding 'limited load' option : this seems to work and helps a lot; however using the debugger is slower that a normale reload.

Tags (5)
1 Solution

Accepted Solutions
celambarasan
Not applicable

conditional load first 100 records for debudding

Hi

      Try this

Sql SELECT TOP 100 *

FROM  "My_Table"

where "My_Table".code = 'abc'

Hope it helps

Celambarasan

2 Replies
celambarasan
Not applicable

conditional load first 100 records for debudding

Hi

      Try this

Sql SELECT TOP 100 *

FROM  "My_Table"

where "My_Table".code = 'abc'

Hope it helps

Celambarasan

andriesb
Not applicable

conditional load first 100 records for debudding

with  Celambarasan Adhimulam answer, I changed my code to :

Let vMaxRecords = 100;

and changed my script to :

Sql SELECT TOP $(vMaxRecords)  *

FROM  "My_Table"

where "My_Table".code = 'abc'

this seems to work !