Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. Set dataManagerTables = '','Transact','SALESPERSON';
  2. //This block renames script tables from non generated section which conflict with the names of managed tables
  3.  
  4. For each name in $(dataManagerTables)
  5. Let index = 0;
  6. Let currentName = name;
  7. Let tableNumber = TableNumber(name);
  8. Let matches = 0;
  9. Do while not IsNull(tableNumber) or (index > 0 and matches > 0)
  10. index = index + 1;
  11. currentName = name & '-' & index;
  12. tableNumber = TableNumber(currentName)
  13. matches = Match('$(currentName)', $(dataManagerTables));
  14. Loop
  15. If index > 0 then
  16. Rename Table '$(name)' to '$(currentName)';
  17. EndIf;
  18. Next;
  19. Set dataManagerTables = ;
  20.  
  21.  
  22. Unqualify *;
  23.  
  24. [Transact]:
  25. LOAD
  26. [Transaction ID],
  27. [Year],
  28. [Month],
  29. [Day],
  30. [Salesperson ID],
  31. [Product ID],
  32. [Serial No],
  33. [ID Customer],
  34. [List Price],
  35. [Sales],
  36. [Gross Margin]
  37. FROM [lib://MyDataFiles/Transact.csv]
  38. (txt, codepage is 28591, embedded labels, delimiter is ',', msq);
  39.  
  40. [SALESPERSON]:
  41. LOAD
  42. [Salesperson ID],
  43. [Salesperson],
  44. [Distributor ID]
  45. FROM [lib://MyDataFiles/Salesperson.xlsx]
  46. (ooxml, embedded labels, table is SALESPERSON);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement