Skip to content
Advertisement

use sql case statement in a adoquery of delphi

so i want to calculate a sum of a field using adoquery and case statement in delphi ; the code i use is this :

but i gest an error message :

syntax error operator absent in the expression case when month(DATE_PAI)=1 then sum(MT) else 0 end

can any one help me please

Advertisement

Answer

Try to do :

(group SELECT and FROM in the same DataModule2.ADOQuery1_630.sql.Add())

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement