Subject Re: SEEKSQL
From Mervyn Bick <invalid@invalid.invald>
Date Tue, 14 Aug 2018 17:08:39 +0200
Newsgroups dbase.getting-started

On 2018-08-14 4:12 PM, MUSTANSIR GHOR wrote:
> Dear All
>
> I am using seeksql.cc  for search purpose. When I index rowset with search field it works fine but  if I use join tables with order by clause (put here search filed name) it gives error . The error it attached here.
>
> Can anybody assist me on this

I hate to admit it but I wrote the line that is giving the problem.
When I made the alterations I did test it but I only used a single
table.  The problem is caused by the correlation names (aliases) needed
when tables are joined.

I'm not sure how to fix this permanently (or even if I can :-( ) but to
get your program working change your SELECT statement in the query.
Give the qualified field that you want to seek on in the fields list an
unqualified alias.  Use this alias in the ORDER BY clause.

Something like

sql = "Select p.patient as patient,p.visit_date, ...... from patients p
sql +="inner join ......."
sql +="order by patient,p.visit_date "

seekerSQL.cc looks in the first field in the order by clause for matches
and it can't handle the alias.

Mervyn.