Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
Need help!!!!
I have created the final Data and now I need to create the QVDs based on this data. I have one Field name: Region. So now what I want if the region has NA (North America) then it will create the QVD on the NA region otherwise it will not create its QVD.
Example:
Tbl1:
LOAD * INLINE [
Region, Text
NA, Jan
SE, Feb
NA, Mar
NA, Apr
DACH, Dec
];
So what I want:
If Region='NA' Then
Store Tbl1 where Region='NA' into [Path] (Qvd);
Endif
If Region='SE' Then
Store Tbl1 where Region='NA' into [Path] (Qvd);
Endif
Regards,
Pawan
In this case would be a loop through the field Region easier. I mean something like this:
for i = 1 to fieldvaluecount('Region')
let vRegion = fieldvalue('Region', $(i));
StoreRegion:
noconcatenate load * resident Example where Region = '$(vRegion)';
store StoreRegioninto [Path\vRegion.qvd] (Qvd);
next
- Marcus
The store-statement has no option to apply a where-condition. You will need to filter your wanted values in previous loadings like:
NA:
noconcatenate load * resident Example where Region = 'NA';
store NA into [Path] (Qvd);
noNA:
noconcatenate load * resident Example where Region <> 'NA';
store noNA into [Path] (Qvd);
- Marcus
Hi Marcus,
Thanks for replying.
I will insert these line for every region:
NA:
noconcatenate load * resident Example where Region = 'NA';
store NA into [Path] (Qvd);
But if any Region is not available in the table then I will not want that region's QVD to be generated.
So If NA region data if not there in the table then it should not be execute the "store NA into [Path] (Qvd);" line.
Is it possible?
Thanks & Regards,
Pawan
In this case would be a loop through the field Region easier. I mean something like this:
for i = 1 to fieldvaluecount('Region')
let vRegion = fieldvalue('Region', $(i));
StoreRegion:
noconcatenate load * resident Example where Region = '$(vRegion)';
store StoreRegioninto [Path\vRegion.qvd] (Qvd);
next
- Marcus
This is exactly what I want. Thanks a lot.
Regards,
Pawan