I have this select statement which returns the correct results (count = 2) when 
run in SQL Database Browser, but not in my Objective-c iPad app (count = 0).

select count(orderdata.order_id) from orderdata, custdata, orderinfo 
       where custdata.customer_id = orderinfo.cust_id and
       orderdata.order_id = orderinfo.cust_id and 
       custdata.Bus_name = 'Albertsons'

I have also tried it this way using JOINs, but get the same results…

select count(orderdata.order_id) from orderdata 
       join custdata on custdata.customer_id = orderinfo.cust_id "
       join orderinfo on orderdata.order_id = orderinfo.order_id "
       where custdata.Bus_name = 'Albertsons'

Any ideas why?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to