Subject sql where statement not working correctly
From Charlie <tm@tc.com>
Date Sat, 14 Jul 2018 06:03:23 -0400
Newsgroups dbase.getting-started

this.SPDDATAARCH2 = new QUERY(this)
   with (this.SPDDATAARCH2)
      left = 40.0
      width = 10.0
      height = 1.0
      database = form.train1
      sql = "select sum(qty) as qqty from SPDDATAARCH.DBF where namedate=trim('spdname')"
      active = true
   endwith

for some reason the sql statement doesn't seem to work for me.  It works without the where clause, but does not with it in.

namedate is a field in the table, spdname is a variable.

without the where clause I get a whole number that is not filtered.  If I try to filter it with the where clause I get a decimal point.  The number should actually be 16.

Can anyone help?

Thanks much!