Subject Re: sql where statement not working correctly
From Heinz Kesting <Nobody@Nowhere.com>
Date Sat, 14 Jul 2018 22:33:35 +0200
Newsgroups dbase.getting-started

Hi Charlie,

> I tried this:
>   sql = "select sum(qty) as qqty from SPDDATAARCH.DBF where namedate=:spname"
>         params['spdname'] = trim('spdname')
>
> However I got an error message that the parameter is not defined spdname


One more thing - if spdname is a variable, probably take from a field
value and it needs trimming before being used as a parameter value, you
would leave out the apostrophes and try it like this:

params['spdname'] = trim(spdname)

otherwise you are ONLY trimming the string 'spdname' (instead of the
value that is currently stored in the variable) - which would just make
no changes ...

Again, hope this helps!
Kind regards, Heinz