Sergey;
Thank you for your time and effort. This is also providing an error.
ERROR: Function arguement, value, type, or count is invalid.
Oh well, I will keep typing and keep a smile on my face. :)
Tom
>Tom,
>
>The VFP string literal is limited to 255 characters. You can use textmerge to have nice readable code and avoid above limitation.
TEXT TO lcSql TEXTMERGE NOSHOW PRETEXT 7
>SELECT R.ReworkNumber, R.Model, R.PartNumber, ;
> R.PartName, R.SupplierCode, R.SupplierName, ;
> R.Problem, TD.Kanban ;
> FROM Rework R, TallyDetail TD ;
> WHERE R.ReworkNumber = TD.ReworkNumber ;
> ORDER BY R.ReworkNumber DESC
>ENDTEXT
>lnResult = SQLEXEC(tConnection, lcSql, 'rvLineCall')
>
>>
>>Mike;
>>
>>Thank you for the idea. I am getting closer.
>>
>>Works.
>>
><snip>
>>ERROR:
Command contains unrecognized phrase/keyword.>>
>>I am accustomed to writing complex SQL expressions but have not tried to do so in SPT. I must be overlooking something that is right in my face and bit me but cannot recognize it!
>>
>>By the way the SQL keywords (FROM, INNER JOIN, WHERE, ORDER BY) appear in blue and the AND statement is not – it is black.
>>
>>
>>Tom