Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
andriesb
Creator II
Creator II

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.

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

      Try this

Sql SELECT TOP 100 *

FROM  "My_Table"

where "My_Table".code = 'abc'

Hope it helps

Celambarasan

View solution in original post

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

      Try this

Sql SELECT TOP 100 *

FROM  "My_Table"

where "My_Table".code = 'abc'

Hope it helps

Celambarasan

andriesb
Creator II
Creator II
Author

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 !