Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set dataManagerTables = '','Transact','SALESPERSON';
- //This block renames script tables from non generated section which conflict with the names of managed tables
- For each name in $(dataManagerTables)
- Let index = 0;
- Let currentName = name;
- Let tableNumber = TableNumber(name);
- Let matches = 0;
- Do while not IsNull(tableNumber) or (index > 0 and matches > 0)
- index = index + 1;
- currentName = name & '-' & index;
- tableNumber = TableNumber(currentName)
- matches = Match('$(currentName)', $(dataManagerTables));
- Loop
- If index > 0 then
- Rename Table '$(name)' to '$(currentName)';
- EndIf;
- Next;
- Set dataManagerTables = ;
- Unqualify *;
- [Transact]:
- LOAD
- [Transaction ID],
- [Year],
- [Month],
- [Day],
- [Salesperson ID],
- [Product ID],
- [Serial No],
- [ID Customer],
- [List Price],
- [Sales],
- [Gross Margin]
- FROM [lib://MyDataFiles/Transact.csv]
- (txt, codepage is 28591, embedded labels, delimiter is ',', msq);
- [SALESPERSON]:
- LOAD
- [Salesperson ID],
- [Salesperson],
- [Distributor ID]
- FROM [lib://MyDataFiles/Salesperson.xlsx]
- (ooxml, embedded labels, table is SALESPERSON);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement