Solved

MySQL date between 2 dates but error msg 2011

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide Table in merge 3 40
Retreiving SOAP FAULT messages using classical ASP 14 28
ASP sending two datas 2 22
Table header must be on top 2 25
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 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