Solved

MySQL date between 2 dates but error msg 2011

Posted on 2011-09-12
1
315 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
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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