Hi,
I am facing an error in below code:
Please guide me what is missing?
(Note: I want to generate three extra fields like, amount, delivered, balance, so I used cast function)
Thanks
Saif
I am facing an error in below code:
Code:
dt1 = ThisForm.contMaster.Datefromto1._datepicker1.Value
dt2 = ThisForm.contMaster.Datefromto1._datepicker2.Value
SELECT Somain.sono, Somain.sodate, Somain.pcode, Customer.full_name,;
Somain.location, CAST(IIF(ratemin#0,qntymin*ratemin,qntymaj*ratemaj)) As N(10,2) As amount, ;
CAST(IIF(ratemin#0,qavalminsd*ratemin,qavalmajsd*ratemaj)) As N(10,2) As delivered,;
Sosub.qntymaj, Sosub.qntymin, Sosub.ratemaj, Sosub.ratemin,;
Sosub.qavalmajsd, Sosub.qavalminsd;
FROM ;
village!somain ;
INNER JOIN village!sosub ;
ON Somain.sono = Sosub.sono ;
INNER JOIN village!customer ;
ON Somain.pcode = Customer.pcode;
WHERE Somain.sodate BETWEEN dt1 AND dt2 ;
ORDER BY Somain.sono;
INTO CURSOR soView READWRITE
Please guide me what is missing?
(Note: I want to generate three extra fields like, amount, delivered, balance, so I used cast function)
Thanks
Saif