Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
See below for table2. number 6 is not in table 1. Then it should stop the script and exit
Example record number 6 is not in Table2. Then it must stop the script and exit the load
The records in Table 2. should belong to Table 1. EXIT SCRIPT
table1:
LOAD * INLINE [
ID
10
9
8
7
6
];
table2:
LOAD * INLINE [
ID
10
9
8
7
];
The following code works and exits script for ID 6 (displays message so you also know which ID was not found). I did name the ID in table2 to ID2 so we can compare one to the other.
table1:
LOAD * INLINE [
ID
10
9
8
7
6
];
table2:
LOAD ID as ID2 INLINE [
ID
10
9
8
7
];
FOR EACH i IN FieldValueList('ID')
IF FieldIndex('ID2', $(i)) = 0 THEN
TRACE ID $(i) NOT FOUND;
EXIT SCRIPT
ENDIF
NEXT i
The following code works and exits script for ID 6 (displays message so you also know which ID was not found). I did name the ID in table2 to ID2 so we can compare one to the other.
table1:
LOAD * INLINE [
ID
10
9
8
7
6
];
table2:
LOAD ID as ID2 INLINE [
ID
10
9
8
7
];
FOR EACH i IN FieldValueList('ID')
IF FieldIndex('ID2', $(i)) = 0 THEN
TRACE ID $(i) NOT FOUND;
EXIT SCRIPT
ENDIF
NEXT i
A tabela Nest For 2 não tem o número 6, portanto, o script não deve continuar. Ele deve ler a tabela 2 e comparar com a tabela 1.
Table2: should have records from table1: If not all of them are missing, 6. it should run the script.
If table 2 contains records from table 1.
Then go on. If not Exit Script
😇
Sorry is right. I didn't understand.
Thank you very much