DO'OH!
I knew it was one of those "Can't see the wood for the trees" occasions.
I've scrutinized each line and STILL didn't spot it. I know how it happened. I copied the select clause from a similar SQL, and deleted the last line for this, but forgot the comma.
Well done you eagle-eyed people.
>You have extra comma after the last field in the list (before FROM).
>
>>Command contains unrecog phrase keyword error on the following.
>>Wassup with that?
>>I've experimented with set engi 70 and 90 but same error. A very similar SQL, just before this, to produce another similar cursor, using the same macro subs is fine.
>>
>>
>>
>>lcMacroBetween = "BETWEEN( Jobs.Number, FromJob, ToJob)"
>>lcOrderBy = "JobNumber"
>>Store 20 to FromJob, ToJob
>>...
>>Select JobAct.*, Invoices.Number as InvNo, ;
>> Jobs.Number as JobNumber, ;
>> UPPER( Jobs.Reference) as JobRef, ;
>> UPPER( Jobs.Text) as JobDesc, ;
>> from JOBACT ;
>> INNER JOIN JOBS ;
>> on JobAct.JobID == Jobs.ID ;
>> INNER JOIN INVOICES ;
>> on JobAct.OurInvID == Invoices.ID ;
>> into CURSOR csrJAs ;
>> where &lcMacroBetween ;
>> and not EMPTY( OurInvID) ;
>> order by &lcOrderBy, InvNo, LineNumber, Subline
>>
>>
>>
>>'ppreciate it
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.