September 2nd, 2012, 12:45 PM
Why is this SQL code not working?
This is just a very simple code, and if you could help point out why it's not working, it'd be much appreciated.
fruitcount = count(*),
FROM Fruits a
JOIN Fruits b
ON a.banana = b.banana
WHERE dragonfruit between ('20090508') and ('20110508')
AND ActiveFlg = 1
September 2nd, 2012, 12:47 PM
please define "not working"
September 4th, 2012, 12:53 PM
Without an error code
it's not much help - what's the error code
But if I had to guess randomly - I'd say your between statement is messed up - you're representing your numbers as strings, remove the parentheses and the quotation marks and try again.