Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Read row-by-row (record-by-record)

Hi,

I need to read row-by-row from a resident table (or qvd), make some transformations to the data and append that row to the loaded-inline table.

Is such a thing possible?

Thnx,

Marko

5 Replies
Anonymous
Not applicable
Author

Marko,
Maybe you want to expain what exactly the issue is. From your question so far the solution is simple:


tab1:
LOAD* INLINE [
A, B, C
...];
JOIN (tab1) LOAD
<expression with field1> as A,
... as B,
... as C
RESIDENT ... (or FROM qvd);


Not applicable
Author

Hi Marko,

please have a look at defining a variable (LET), "PEEK" function and "For ... Next" in QV help file.

And of course copy and paste from the attached application if it is useful.

Good luck!

Rainer

Not applicable
Author

Yes, I should have explained it more 🙂

The issue is that I need to build a hierarchy using a table on SQL Server as a "guideline". The order of records in that table defines the hierarchy. By having counters called "ParentID" and "ID" and going through the mentioned table "row-by-row" I could generate a table that could be used for building a hierarchy:

ParentID, ID, Code

0, 1, F1

1, 2, F1N11

1, 3, F1N11A

0, 4, P1

...

johnw
Champion III
Champion III

Here's an example of building a hierarchy from knowing the level and that the rows are coming in a preorder traversal sequence. So I think this may be what you're looking to do? Or perhaps close, anyway. It's not actually doing a hierarchy load, but rather doing something similar to what a hierarchy load would do.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Marko,

reading data row by row is pretty easy using function peek(), but keep in mind that it's VERY SLOW.

Try to find another solutions if you can.

Ask me about Qlik Sense Expert Class!