Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rxp03570
Creator
Creator

Looping account_id to limit load on Database

Hi All,

 

I'm trying to pass account_id from 1 to 1000, if I do a select * without any filter the app is creashing as the data is too big for it to handle. Can someone suggest on how to create a loop for the same.

 

Something that I have tried:

For i=0 to 1000

Let vAccount_ID =Peek( i);

AccountLoad:

Select * from apps.data_load where account_id='$(vAccount_ID)';

 

Will a query like this workout.

Thanks,

1 Solution

Accepted Solutions
teiswamsler
Partner - Creator III
Partner - Creator III

Hi @rxp03570

 

This should work just fine

 

Accountload:

Load * inline [

account_id

];

For i=0 to 1000

concatenate(Accountload)

Select * from apps.data_load where account_id='$(i)';

next i

 

Br.

Teis

View solution in original post

4 Replies
balabhaskarqlik

AccountLoad:
Load * ;

Select * from apps.data_load where account_id <= 1000;

Anil_Babu_Samineni

Your Query loaded from SQL which is not equal to Qlikview LET statement. So, We can't by pass LET statement to SQL queries. If you exactly need in between. You can attempt using SQL or Qlikview like follows

SQL Select * from apps.data_load where account_id Between 0 and 1000;

Else in Qlikview,

Table:

Load * Where account_id >=0 and account_id <= 1000;

Select * from apps.data_load;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
teiswamsler
Partner - Creator III
Partner - Creator III

Hi @rxp03570

 

This should work just fine

 

Accountload:

Load * inline [

account_id

];

For i=0 to 1000

concatenate(Accountload)

Select * from apps.data_load where account_id='$(i)';

next i

 

Br.

Teis

rxp03570
Creator
Creator
Author

Thanks for the reply, this seems to work.