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

Alternate fuction to Lastvalue() in the script, as it is consuming huge memory while reloading ??

Hi All,

we are using lastvalue() fuction in the script almost 30 times due to which the script execution taking huge memory and leads to Inconstance memory Type A error.

Ex:

Table_A:

load A,B,c ... from xyz.qvd;

Tabla B:

load lastvalue(A) as lastname_a,

lastvalue(B) as lastname_b,

resident Table_A ;

like above lastvalue() fuction used almost 30 times in the script. I think replacing it with some similar fuction which will serve the purpose is going to fix this issue..

 

please suggest the suitable function to replace the lastvalue() fuction. Thanks Much in advance.

 

 

 

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps you can use Peek() to get the results from the previous load:

 

Table_A:
load A,B,c ... from xyz.qvd;

Let vA = Peek('A', -1);  //-1 gets last value loaded
Let vB = Peek('B', -1);

 

If you need them in a table, then add:

 

Table_B:
LOAD '$(vA)' as lastname_a,
  '$(vB)' as lastname_b
AUTOGENERATE 1;

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps you can use Peek() to get the results from the previous load:

 

Table_A:
load A,B,c ... from xyz.qvd;

Let vA = Peek('A', -1);  //-1 gets last value loaded
Let vB = Peek('B', -1);

 

If you need them in a table, then add:

 

Table_B:
LOAD '$(vA)' as lastname_a,
  '$(vB)' as lastname_b
AUTOGENERATE 1;

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein