Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have some production data to be processed.
Each work-order consists of several operations, indicated by a number, which is not necessarily a progressive continuum (eg work-order 100, operations 1,3,8 work-orders 101, operations, 1,5, 7 etc. ). There is a sequence number, which indicates the sequence in which the operations are done in the same work-order.
For each operation I have an end date but no start date. The start date of an operation, however, could be represented by the end date of the previous operation, within the same work-order.
I tried to insert the following statement in the script, but it doesn't work.
OPERATIONS:
load *
PREVIOUS (OPERATION_DATA_END) AS OPERATION_DATA_START;
LOAD *
FROM OPERATION.QVD (QVD) order by OPERATION_WORK_ORDER, OPERATION_NUMBRE_SEQUENCE;
Someone have any ideas???
thanks
Tiziana
Hi Tiziana,
The problem in this Order By command, you need to load a resident to use the command Order By, try this:
TMP_OPERATIONS:
LOAD *
FROM OPERATION.QVD (QVD) order by OPERATION_WORK_ORDER,OPERATION_NUMBRE_SEQUENCE;
OPERATIONS:
load
*,
PREVIOUS (OPERATION_DATA_END) AS OPERATION_DATA_START
RESIDENT TMP_OPERATIONS
order by OPERATION_WORK_ORDER,OPERATION_NUMBRE_SEQUENCE;
drop table TMP_OPERATIONS;
Hi Tiziana,
The problem in this Order By command, you need to load a resident to use the command Order By, try this:
TMP_OPERATIONS:
LOAD *
FROM OPERATION.QVD (QVD) order by OPERATION_WORK_ORDER,OPERATION_NUMBRE_SEQUENCE;
OPERATIONS:
load
*,
PREVIOUS (OPERATION_DATA_END) AS OPERATION_DATA_START
RESIDENT TMP_OPERATIONS
order by OPERATION_WORK_ORDER,OPERATION_NUMBRE_SEQUENCE;
drop table TMP_OPERATIONS;
Thanks, now it work correctly.
I just deleted the order by from the TMP_OPERATIONS.
Bye
Ok,
I forgot to remove the order by.