>>select a.field1, b.field2 FROM atable a, btable, b WHERE a.prikey = b.forkey
>
>correction:
>
>select a.field1, b.field2 FROM atable a, btable b, WHERE a.prikey = b.forkey
The hardest to catch, but seems to be I've done it too many times, so I've trained myself into catching this type of error.
Try without the comma before "WHERE".