Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Checking source file for correct field names before load
Hi,
Try like this
Try this sample script
Table:
LOAD
*
INLINE [
A,B,C
1,2,3];
QVDTable:
A,B,D
1,2,4];
LET vFieldName = '';
LET vQVDTableFieldName = FieldName(3, 'Table');
For i = 1 TO NoOfFields('QVDTable')
LET vTableFieldName = FieldName($(i), 'Table');
LET vQVDTableFieldName = FieldName($(i), 'QVDTable');
IF vTableFieldName = vQVDTableFieldName THEN
//DO Nothing
ELSE
LET vFieldName = vFieldName & vQVDTableFieldName & ';';
ENDIF
NEXT i
Regards,
Jagan.