Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I was trying with the following code to store certain selected fields into a qvd, but I wasn't able to make it work. Thanks in advance.
Store DESC_CUENTA3_ER
,DESC_CUENTA4_ER
,DESC_CUENTA5_ER
,DESC_CUENTA6_ER
,DESC_CUENTA7_ER
,ZONA_REZONIFICACION
,DESC_PLANTA
,P_TERRITORIO
,Mes
FROM HECHOS_ER
INTO $(vETL)Estadistico.qvd (qvd);
I presume that the table HECHOS_ER is already loaded and the variable vETL is defined.
Then you may use the following script:
TableName:
NoConcatenate
LOAD DESC_CUENTA3_ER
,DESC_CUENTA4_ER
,DESC_CUENTA5_ER
,DESC_CUENTA6_ER
,DESC_CUENTA7_ER
,ZONA_REZONIFICACION
,DESC_PLANTA
,P_TERRITORIO
,Mes
Resident HECHOS_ER
Store TableName INTO $(vETL)Estadistico.qvd (qvd);
Drop Table TableName;
May need a semi-colon at the end of the LOAD statement and before the STORE?
That should work just fine. What is the problem you are experiencing? Do you get an error?
You can even rename your fields while STOREing, as shown by this example:
MyTable:
LOAD * INLINE [
Name, RegNo, Amt
ABCD, 10000, 100
EFGH, 20000, 250
IJKL, 59000, 999
];
STORE Name AS a, RegNo AS b FROM MyTable INTO [.\xyz.qvd] (qvd);
But make sure that in your case, variable vETL contains either nothing or a path without spaces. In the latter case, put the full path between square brackets (as in the example above), or the scripting engine will fall over.
[Edit] Corrected spelling mistakes...