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

créer un qvd ou pas selon le contenu des données d'une table

Comment faire pour créer un qvd que si une des données de ma table stocks répond à certaines conditions comme par exemple > 10

et si ce n'est pas le cas, le qvd ne se créer pas et donc on garde la version precedente.

dans mon script de chargement, je doit ou non faire un STORE <TABLE> into STOCKS.QVD

merci d'avance si quelqu'un a une idée

3 Replies
Anonymous
Not applicable
Author

Laurent,

Store will create a qvd with the entire table. So you will have first to create a table with the data you want to store, and then store it and drop it. Like:

finaltable: noconcatenate load * from initialtable where condition...;

store finaltable into finaltable.qvd (qvd);

drop table finaltable;

Hope it helps.

Marc.

sushil353
Master II
Master II

hi,

try below:

if a > 10 then

store <Table> into Stocks.qvd(qvd);

end if;

HTH

sushil

Peter_Cammaert
Partner - Champion III
Partner - Champion III

This is an example:

Check:

LOAD Sum(Qty) AS TotalQty

RESIDENT STOCK

WHERE ProductCode = 'a';

LET vCurrentProductAQty = peek('TotalQty');

IF vCurrentProductAQty > 10 THEN

   STORE STOCK INTO STOCK.QVD(qvd);

END IF