bbenedict Posted January 4, 2013 Share Posted January 4, 2013 I am trying to execute this statement but get the error in the title. Google has not been any help, any ideas? select inq_type, COUNT(d.id)from DBl_olap.dbo.Dim_lead d, BDl_OLAP.dbo.FACT_LEADwhere createddate between 2012-1-1 and 2012-12-31group by inq_typeorder by COUNT(d.id) desc thanks! Link to comment Share on other sites More sharing options...
justsomeguy Posted January 7, 2013 Share Posted January 7, 2013 You need to delimit the date values somehow, however your database requires it. Right now you're telling it to subtract 1 from 2012, and then subtract 1 from that. That's not a date value, it's subtraction. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now