General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
The syntax you use for your left join is incorrect. You can use
select ...;
from apdetl;
left join appay on apdetl.apdetlid=appay.apdetlid ;
where apdetl.apmasid=apmas.apmasid
Or
select ...;
from apdetl;
where apdetl.apmasid=apmas.apmasid and apdetl.apdetlid=appay.apdetlid
HTH
>select apdetl.ivcdate, apdetl.ivcnum, apdetl.duedate, apdetl.amount, sum(appay.amount), apdetl.amount-sum(appay.amount) ;
>from apdetl left join appay ;
>where apdetl.apmasid=apmas.apmasid and apdetl.apdetlid=appay.apdetlid ;
>into cursor curLstApDetl ;
>order by apdetl.ivcdate
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only