CLOSE ALL USE test brow&&i can see my data(found) ldStart =ctod("01/01/2006") ldEnd = ctod("31/12/2006") SELECT stk_code,trn_type,trn_date,cst_prce,str_nmbr, ; SUM(IIF(MONTH(trn_date)=1 AND trn_type=1,trn_qnty, 000000)) AS m1_t ; FROM test ; WHERE between(trn_date,ldStart,ldEnd)&&no result WHERE between(trn_date,date(2006, 12, 31)) ;error GROUP BY stk_code,trn_type,trn_date,cst_prce,str_nmbrtanks.
>>ldStart =ctod("01/01/2006") >>ldEnd = ctod("31/12/2006") >> >>SELECT stk_code,trn_type ; >> SUM(IIF(MONTH(trn_date)=1 AND trn_type= 44, trn_qnty, 000000)) AS m1_t ; >> FROM test ; >>WHERE between(trn_date,ldStart,ldEnd) ; >>GROUP BY stk_code,trn_type >>brow >>>>thanks
>{^2006-12-31} && unambiguous date constant >date(2006, 12, 31) && unambiguous date expression >