"Gert van der Spoel" <suppressed> wrote:William Fiore writes: > You were right. I changed "CurrentDate()" to "CurrentDate() -90" and I am> getting some results. Do you have any idea how I can also only display> sku's that are located in the "sku" column of my "orderline" table. > Untested, no guarantees:SELECT * FROM products WHERE sku = ANY (SELECT sku FROM inventoryWHERE quantity > 5) AND date_added >= curdate() AND sku = ANY (SELECT sku FROM orderline)Sorry to jump in here, but I can't read any more sub-selects without covering my monitor with diced carrot. :-)
Please anyone give me a chance to add another sub-select!! ;)
Try something like the following instead (untested):
SELECT DISTINCT p.sku, p.title, p.description, p.price
FROM products p, inventory i, orderline o
WHERE p.sku = o.sku
AND p.sku = i.sku
AND i.quantity >= 5
AND i.date_added >= DATE_ADD(CURDATE(),INTERVAL -90 DAY)
I'm sure you meant p.date_added ... Oh wait you spoiled this one already by telling ... toooo baaaaaad! :)
_______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.