Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Below is my script trying to find the count of records between the dates .
Test:
load
count(RecNo()) as countRec
FROM
[$(MyPath_Int)\SALES.QVD]
(qvd)
where num(SALESDATE) >= $(START_DATE) and num(SALESDATE) <= $(END_DATE);
is it correct syntax and logi to get count of records
Please correct me if i am wrong with the script.
are you getting any error ...what you are trying to do .. it looks correct.
Thanks
BKC
try it with a group by at the end:
Test:
load
SALESDATE,
count(RecNo()) as countRec
FROM
[$(MyPath_Int)\SALES.QVD]
(qvd)
where num(SALESDATE) >= $(START_DATE) and num(SALESDATE) <= $(END_DATE)
Group By SALESDATE;
Use RowNo() instead of recno(). Count migth not be necessary here. Try like:
Load
RowNo() as Count
From ....;
Now maximum of the count will give you the no of records.
Hi,
Can you post complete script with
How you set Variable START_DATE and END_DATE
and format of SALESDATE
It is guess
I think there is problem in Num(SALESDATE)
try with Num(Date#(SALESDATE,YourFormat)) instead of only writing num(SALESDATE)
Regards
HI
Thanks for reply
Let END_DATE = num(Date(Today()-$(FCT_SALES_F),'DD/MM/YYYY'));
LET START_DATE =num(MakeDate(Year(today()) -1));
when i am executing the script it is not throwing any error or not populating any data but time is running
Thanks