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

Load First few rows of multiple files

I am loading TXT files which contain the opening balance for each of our loan products. All I want is the first "Beginning Balance" value in this image:

Op_Bal.jpg

So I wanted to use "WHERE ROWNO() < 4" for instance. The problem is that I am loading multiple files (one per product) into the same table, so the rows keep incrementing, and while my opening balance is in line 1 (excluding the headers) for this "DUNSA" product file, it will be in row 10 for the next product file.

I also thought of just loading WHERE [Outstanding Balance] = 'Beginning Balance'.... but there are 2 such records in each file.

Any way I can STOP loading after a few rows but in multiple files, or where I can stop loading each file when I get to "Profit and Loss Balance" row?

1 Solution

Accepted Solutions
sunny_talwar

What about using First 4

First 4

LOAD FieldName

FROM YourFile;

View solution in original post

4 Replies
sunny_talwar

What about using First 4

First 4

LOAD FieldName

FROM YourFile;

gerhardl
Creator II
Creator II
Author

Wow. Been struggling 20 minutes with this and didn't know about that... awesome!

sunny_talwar

You can read about this more in the help sections:

First ‒ QlikView

sunny_talwar

Although I think RecNo might have also worked

Where RecNo() < 4;