I have these two tables and I want to do a count for a condition, the problem is that I have to use two tables so it makes the results inaccurate.
select count(fsmSocialSecurity) from fsmain, fsErrorLog where (fsmTechnicianNumber = '1701') and (fsmSignOffStatus = 3) and ((fseHadTANFError=1) or (fseHadFSError=1))
I only want to count records in the fsMain table
fields that start with fsm are in the fsMain table fields that start with fse and in the fsErrorLog table.
another thing is that I am assigning this count value to a variable in Delphi by doing this
MyError := DataModule1.ErrorQuery.Fields.AsInteger;
is this the best way?