• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

How to use between operator in mysql

My datas has been stored like below:

2012-07-11|2012-07-13|2012-07-20|2012-09-17

I am using this query:

select * from jobcard where Deleted!='1'  and JDated  between '2012-07-13' and '2012-09-17' order by JNo desc

But i didn't get that values.

When i execute this query the output should be displayed like below:
2012-07-13
2012-07-20
2012-09-17

How to get that values using mysql query.
0
jnj_web_solutions
Asked:
jnj_web_solutions
2 Solutions
 
elevationkevinCommented:
I had a similar problem and this helped me. Let me know.

http://thinkdiff.net/mysql/how-to-get-rank-using-mysql-query/
0
 
sameer2010Commented:
Is your data actually stored as pipe separated dates or as separate rows? If it is separate rows, the output should be correct.
If not, you would need to write something to parse pipe separated dates and convert it into rows and then apply between on the same.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now