Solved

MySQL date between 2 dates but error msg 2011

Posted on 2011-09-12
1
324 Views
Last Modified: 2012-08-14
Here is the code that will Not run on MySQL on a Windows server:

SELECT CustomerYN, ActiveYN, FirstName, MidName, LastName, EmailMain, CoProfile, GoalUrgent, Mx1, Title, CoName, OrigContactDate
WHERE (OrigContactDate BETWEEN '2011-03-12' AND '2011-08-31')
FROM prospect
ORDER BY OrigContactDate, LastName

There seems to be a problem with the dates and the BETWEEN.  I find lots of examples but none that fixes this problem.  
0
Comment
Question by:KennethSumerford1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
KennethSumerford1 earned 0 total points
ID: 36526741
This works OK.

SELECT CustomerYN, ActiveYN, FirstName, MidName, LastName, EmailMain, CoProfile, GoalUrgent, Mx1, Title, CoName, OrigContactDate
FROM prospect
WHERE (
OrigContactDate
BETWEEN '2011-03-12'
AND '2011-09-10'
)
ORDER BY OrigContactDate, LastName
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question