Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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);
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
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
...
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.
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.