The following code works for me:
- Code: Select all Expand view RUN
- SELECT vendedor, SUM(gtot) Total_Ventas FROM facturah
WHERE vendedor IN ( "FRANCISCO","ROBERTO" ) AND fecha BETWEEN '2012-01-01' AND '2012-06-30'
GROUP BY vendedor ORDER BY vendedor,fecha ;
However, I want to automate it by sending a variable with the relevant data:
This does not work. In addition to trying it in many other ways.
- Code: Select all Expand view RUN
- cCad := "FRANCISCO,ROBERTO"
WHERE vendedor IN ( '"+cCad+"' ) AND fecha BETWEEN '2012-01-01' AND '2012-06-30'
It runs without errors, but does not show any results.
Can you tell me what is the right way?
Regards.