

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Continue counting from last position
Hi people,
I have this :
INPUT
TABLE 1 | |||
FIELD_ID | VALUE | ROW | |
10 | ABCD | 1 | |
12 | DFHD | 2 | |
13 | FFSF | 3 | |
14 | HHJK | 4 |
TABLE 2 | ||
FIELD_ID | VALUE | |
5 | FFVM | |
11 | XXSW |
OUTPUT
TABLE 2 | |||
FIELD_ID | VALUE | ROW | |
5 | FFVM | 5 | |
10 | ABCD | 1 | |
11 | XXSW | 6 | |
12 | DFHD | 2 | |
13 | FFSF | 3 | |
14 | HHJK | 4 |
So i need to continue counting from last position before concatenate Table 2 in Table 1, that some way to set RowNo() to start from a position?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Inline load is for sample only.
T1:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE From YourTable1;
T2:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE From YourTable2;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
T1:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE Inline
[
FIELD_ID, VALUE, ROW
10, ABCD, 1
12, DFHD, 2
13, FFSF, 3
14, HHJK, 4
];
T2:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE Inline
[
FIELD_ID, VALUE, ROW
5, FFVM
11, XXSW
];


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If i have 100000 lines, i will need to create a Inline with each line?
I need to create a kind of primary key.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Inline load is for sample only.
T1:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE From YourTable1;
T2:
Load AutoNumber(RowNo()) as ROW, FIELD_ID,VALUE From YourTable2;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be like this?
T1:
Load ROW, FIELD_ID,VALUE Inline
[
FIELD_ID, VALUE, ROW
10, ABCD, 1
12, DFHD, 2
13, FFSF, 3
14, HHJK, 4
];
Let x=FieldValue('ROW',FieldValueCount('ROW'));
set x=1;
T2:
Load if(RowNo()=1,$(x),Peek(ROW)+1) As ROW, FIELD_ID,VALUE Inline
[
FIELD_ID, VALUE, ROW
5, FFVM
11, XXSW
];


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Have you managed to find a correct solution to your question?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sasidhar, sorry, but my boss ask me a SLA here so i could find time to test today. I'll focus on that issue only tomorrow.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manish,
Using AutoNumber(FIELD_ID&VALUE) to generate a Primary Key with table 1, if i use AutoNumber(FIELD_ID&VALUE) to a table 2, thats a chance that Key occur more than 1 time? I can't have reapeat number keys.
Thank You


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made some tests and exists a chance to repeat a key if i run the tables in separated moments, like save a qvd and after run a table, but if i do an incremental load will be fine. Thank you.
