Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem multiples data in tables Viewer

Hi, I have a problem in my tables viewer; so in my script.

This is my tables:

FOR each vFile in filelist('$(vCheminData)FILE.DAT')

TMP_WORKFLOW:
LOAD
       text([Division] & '-' & [Num]) AS %NumComplet,
       [step Code] AS [Code Step],
       [Service Code] AS %CodeService
  FROM $(vFile) (txt, codepage is 1252, embedded labels, delimiter is ';', no quotes);
     
D_WORKFLOW:
     LOAD * INLINE %NumComplet;
JOIN(D_WORKFLOW) LOAD
       %NumComplet,
       [Step Code],
       %CodeService
RESIDENT TMP_WORKFLOW;

STORE D_WORKFLOW INTO '$(vCheminQVD)D_WF.qvd' (QVD);
DROP TABLE TMP_WORKFLOW;
NEXT vFile

TMP_SERVICE:
  LOAD
       [Code Service] AS %CodeService,
       [Name Service],
       [Code Service] & ' - ' & [Name Service] AS Service
  FROM $(vFile) (txt, codepage is 1252, embedded labels, delimiter is ';', no quotes); // (.DAT)

M_SERVICE:
LOAD * INLINE %CodeService;
  JOIN(M_SERVICE) LOAD
       %CodeService,
       [Name Service],
       Service
     RESIDENT TMP_SERVICE;

STORE M_SERVICE INTO '$(vCheminQVD)M_SERVICE.qvd' (QVD);
DROP TABLE  TMP_SERVICE;
exit script;

And, when i reload and open my tables viewer, i have like 200 times the same value if i make a right click on Services table....

And i should have only one value for each %CodeService.

I have this problem for each secondary tables with common key in my other files too.

Do yo see the problem ?

Thanks by advance

2 Replies
Anonymous
Not applicable
Author

Hi, what are you trying to accomplish with the Join? or rather, what modification are you looking to do compared to the original dat file?

Not applicable
Author

The Tmp tables are for the modifications and the normal tables are for the finised tables. I'm trying to separate the table Service, who is usually in the workflow table; because it's a key, i need to reduce to the maximum the main table so WORKFLOW and have all secondary tables with the same kind of informations, so here: the service code, the service name, and the service (code + name). So i have to separate it like this ... If I don't use the

LOAD * INLINE 'table';

  JOIN('table') LOAD

It doesn't work...