Subject Re: Query error
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 2 Sep 2023 09:55:32 +0200
Newsgroups dbase.getting-started

On 2023/09/01 19:10, Tom wrote:
> Hi all,
>
> Having trouble with the following query which produces a 'type mismatch
> in expression' error. I thought I ave the TestDate timkeStamp field
> converted to a character field so I could search of a value with the
> 'like' expression. dBase is not happy with my efforts. Can you correct
> the error? Mind the wrap.
....
>  sql = [Select CAST(TestDate as Char(10)) d.TestDate, d.Provider, d.Client, ;

                  CAST(d.TestDate as char(10)) cTest_date

>        d.Category, d.Allergen, d.TestLevel, d.StdTestRange, n.Demodata_Notes ;
>        FROM DemoData d Left Join DemoNotes n On n.Fk_DemoData = d.Pk_DemoData
>        WHERE ;
>        d.TestDate LIKE :TestDate AND ;

           cTestDate LIKE :TestDate ....

>        LOWER(d.Category) LIKE :Category AND ;
>        LOWER(d.Allergen) LIKE:Allergen ;
>        ORDER BY TestDate, Category, Allergen ]

I'm running out of time as the power is due to go off for 2 hours in 7
minutes.

I'll add more later.

Mervyn.