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

Using for i loop

Hi,

I've stuck with the loop in my load script. Data source is the web file (html).

code looks like this:

CLIENTID:

QUALIFY *;

for i=1 to 3

LOAD clientid

FROM

[http://www.zzzz.com/page/$(i)]

(fix, codepage is 1252)

where clientid <> null();

NEXT

This code works fine but I expect to receive one table named 'CLIENTID' with all the clientid's from three different web pages. When I run my code it creates 3 separate qv tables: 'CLIENTID' then '1' and '3'. Is there any way to loop the data sources and get all the data in ONE qv table ('CLIENTID' in this example)?

Any help will be highly appreciated.

Thank you in advance,

~Sergejs

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I would suggest removing the qualify statement and then putting the table name CLIENTID before the LOAD, like

for i=1 to 3

CLIENTID:

LOAD clientid

FROM ...

Hope this helps,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

I would suggest removing the qualify statement and then putting the table name CLIENTID before the LOAD, like

for i=1 to 3

CLIENTID:

LOAD clientid

FROM ...

Hope this helps,

Stefan

zekazak
Creator
Creator
Author

Hi Stefan,

It does work. Brilliant. Thank you very much!

Best Regards,

~Sergejs