Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am loading only one column from Qvd
Orders:
Load Order_No
From c:\ORD.qvd(Qvd);
I want to get the cont of distinct Orders_No into script and store in the variable at the script level only.
Hoe to do this?
Thanx in Advance..!!
Hi, you need to load your table in temporary table usuing COUNT(DISTINCT YOUR_VALUE).
To read the value and insert into a variable, use the function PEEK;
Ex.:
Orders:
Load Order_No
From c:\ORD.qvd(Qvd);
NOCONCATENATE
TMP:
LOAD COUNT(Distinct Order_No) AS Qty
RESIDENT Orders;
LET vQty = PEEK('Qty', 0, 'TMP');
DROP TABLE TMP;
Hi, you need to load your table in temporary table usuing COUNT(DISTINCT YOUR_VALUE).
To read the value and insert into a variable, use the function PEEK;
Ex.:
Orders:
Load Order_No
From c:\ORD.qvd(Qvd);
NOCONCATENATE
TMP:
LOAD COUNT(Distinct Order_No) AS Qty
RESIDENT Orders;
LET vQty = PEEK('Qty', 0, 'TMP');
DROP TABLE TMP;
Hi,
Please check the application,by using peek function you can take value into variable.
Regards
Thnx.. It is perfect..
Sorry,
Please find the attachment of applicatio,
Regards