Subject |
Re: Query error |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Sat, 2 Sep 2023 14:32:45 +0200 |
Newsgroups |
dbase.getting-started |
On 2023/09/02 14:04, Tom wrote:
> Sorry Mervyn but I am still confused here. The following 'cut down'
> version still has the 'invalid field name' error. Trying to get this to
> work correctly then I can add back the rest of my original query.
>
> Revision2:
> *
>
> sql = "Select CAST(d.TestDate as Char(10)) Test_Date, 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 Test_Date LIKE :TestDate"
> *
> params["TestDate"] = "%"
This error message usually means there is a typo in one of the field
names. If you've checked the fieldname spelling and the problem still
persists then I'm afraid it's a process of elimination. Start from
scratch and add a field at a time.
sql = "select CAST(d.TestDate as char(10) Test_Date from Demodata d
WHERE Test_date LIKE :TestDate"
sql = "select CAST(d.TestDate as char(10) Test_Date,d.TestDate from
Demodata d WHERE Test_date LIKE :TestDate"
sql = "select CAST(d.TestDate as char(10)
Test_Date,d.TestDate,d.Provider from Demodata d WHERE Test_date LIKE
:TestDate"
and so on.
Mervyn.
|
|