unicornkhh
MIS
Hi everyone,
I'm new here and have searched related topics but non is related to my question:
My company had an old VFP 6.0 but I installed VFP 9.0 on my desktop.
Here's the SQL statement I have in the Excel VBA:
select sh.id, sh.finaldate, sh.writtendate, sum(ar.amount) as 'balance' ;
from sohead sh JOIN ar ON sh.id=ar.so ;
where not deleted() and sh.status='F' and sh.kind=='S' ;
AND sh.finaldate BETWEEN DATE(2005,1,1) AND DATE(2006,9,31) ;GROUP BY sh.id, sh.finaldate, sh.writtendate;
I would like to minimize the selection by adding a filter condition in the WHERE clause like " balance!=0" or "balance<>0" . The statement was tested OK in Ms SQL 2000 but failed in VFP 9.0. The error message is "Column balance not found"
Could anyone shed light on this?
I'm new here and have searched related topics but non is related to my question:
My company had an old VFP 6.0 but I installed VFP 9.0 on my desktop.
Here's the SQL statement I have in the Excel VBA:
select sh.id, sh.finaldate, sh.writtendate, sum(ar.amount) as 'balance' ;
from sohead sh JOIN ar ON sh.id=ar.so ;
where not deleted() and sh.status='F' and sh.kind=='S' ;
AND sh.finaldate BETWEEN DATE(2005,1,1) AND DATE(2006,9,31) ;GROUP BY sh.id, sh.finaldate, sh.writtendate;
I would like to minimize the selection by adding a filter condition in the WHERE clause like " balance!=0" or "balance<>0" . The statement was tested OK in Ms SQL 2000 but failed in VFP 9.0. The error message is "Column balance not found"
Could anyone shed light on this?