Subject Query error
From Tom <IHaveNoEmail@ddress>
Date Fri, 1 Sep 2023 13:10:26 -0400
Newsgroups dbase.getting-started

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.


    this.qDATA = new QUERY(this)
    with (this.qDATA)
       left = 259.0
       top = 434.0
       width = 39.0
       height = 37.0
       database = form.dbJEREMIAHDATA
                  sql = [Select CAST(TestDate as Char(10)) d.TestDate, d.Provider,
d.Client, ;
                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 ;
                LOWER(d.Category) LIKE :Category AND ;
                LOWER(d.Allergen) LIKE:Allergen ;
                ORDER BY TestDate, Category, Allergen ]
                params["TestDate"] = '%'
                params["Category"] = '%'
                params["Allergen"] = '%'
//                params["Notes"] = '%'
       requestLive = false
       active = true
    endwith

Thanks,

Tom