Hello,
I'm new at this and need the help of the experts, im trying to make a query using the following;
Table = CUSTABLE1
FIELDS: cus_name, cus_id, pur_date, sales_type, sales_total,
Make a query to export the fields above listing only when pur_date is between 1/1/16 – 1/31/16. Also
Sales_type stores 2 different characters “a” and “b” . Can these be put in 2 different columns suming the sales_total of each?
Simple CASE expression:
CASE input_expression
WHEN when_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ]
END
Searched CASE expression:
CASE
WHEN Boolean_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ]
END
This won't work from Visual fox pro 9 right?
this is what I have so far;
Select custable1.cus_name, custable1.cus_id, custable1.pur_date, custable1.sales_type, custable1.sales_total;
from custable1 where custable1.pur_date > date(2016,01,01) and custable1.pur_date < date(2016,01,31);
into cursor temp1
I can't figure out how to filter the custable1.sales_type and also sum the sales_total either.