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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumarb
Creator II
Creator II

auto generate each reload number as a Filed

Hi All

In my Script I have a field ReloadNumber

old_data:

ReloadNumber      Item      Description

     1                         04          a

     1                         05          b

     2                         06          c

     2                        08          d

     2                        07          f

     3                        09          g

     2                         10         h

new_data

Item      Description

12               P

14               p

15               L

After reload of  table old_data have to update  with new_data

ReloadNumber      Item      Descreption

     1                         04          a

     1                         05          b

     2                         06          c

     2                        08          d

     2                        07          f

     3                        09          g

     2                         10         h

     4                         12         P

     4                         14         Q

     4                         15         L

field ReloadNumber have to update automatically according to each update,

please suggest how to achieve it


1 Solution

Accepted Solutions
swuehl
MVP
MVP

Table:

LOAD * FROM OlddataSource;

Max:

LOAD Max(ReloadNumber) as Max Resident Table;

Let vMax = Peek('Max',0,'Max');

Concatenate (Table)

LOAD $(vMax)+1 as ReloadNumber, Item, Description

FROM NewDataSource;

DROP TABLE Max;

View solution in original post

2 Replies
swuehl
MVP
MVP

Table:

LOAD * FROM OlddataSource;

Max:

LOAD Max(ReloadNumber) as Max Resident Table;

Let vMax = Peek('Max',0,'Max');

Concatenate (Table)

LOAD $(vMax)+1 as ReloadNumber, Item, Description

FROM NewDataSource;

DROP TABLE Max;

rajkumarb
Creator II
Creator II
Author

Thank you Stefan