Using Like in a select
Joseph Morgan
joseph at checkos.com
Tue Dec 25 20:47:34 CST 2007
Why does this select not yeild any results?:
"select customers.accountname,
accountsreceivable.ardate,
accountsreceivable._rowID,
accountsreceivable.artotal from accountsreceivable,
customers where accountsreceivable.arcustomerID = customers._rowID
and customers.accountname LIKE ' %CPS% '
and accountsreceivable.arpaymentstatus = 0
order by customers.accountname"
But this does:
"select customers.accountname,
accountsreceivable.ardate,
accountsreceivable._rowID,
accountsreceivable.artotal from accountsreceivable,
customers where accountsreceivable.arcustomerID = customers._rowID
and customers.accountname = 'CPS '
and accountsreceivable.arpaymentstatus = 0
order by customers.accountname"
The only difference is line 6, I am trying to use LIKE but it returns
no results,
but it should. I need the LIKE statement to work in this situation, is
this a bug?
If so any suggestions for a workaround?
Thanks,
Joseph
More information about the Valentina
mailing list