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