On 6 Dec 2013, at 6:13pm, Scott Slater <sslat...@summitcn.com> wrote:
> I have attached a very small subset of this client's data that demonstrates > the problem. Using the attached file which contains 4 orders none of which > should get selected using the statement below; Sorry, but you can't attach files to posts to this list. We don't want everyone sending us their homework. However ... > SELECT * FROM orders_tbl WHERE > (ord_total+discount-tax1-tax2-tax3-tax4-delivery_tax-delivery_fee)!=subtotal; Are you certain that subtotal is being evaluated as a number and not text ? Try SELECT ord_total+discount-tax1-tax2-tax3-tax4-delivery_tax-delivery_fee,subtotal,typeof(subtotal) FROM orders_tbl Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users