Find between char field
From: <wilsonfalai_at_gmail.com>
Date: Mon, 25 Apr 2016 07:04:00 -0700 (PDT)
Message-ID: <0e23ed9f-1d42-4068-b62c-24ed623b40be_at_googlegroups.com>
I have a char field where I keep month and year as follows: 01/2015 or 02/2015 or 12/2015 or 03/2016 ... I want to do a search and return all records from a period Example:
Date: Mon, 25 Apr 2016 07:04:00 -0700 (PDT)
Message-ID: <0e23ed9f-1d42-4068-b62c-24ed623b40be_at_googlegroups.com>
I have a char field where I keep month and year as follows: 01/2015 or 02/2015 or 12/2015 or 03/2016 ... I want to do a search and return all records from a period Example:
SELECT ... AND (`periodo_referente` BETWEEN '01/2016' AND '04/2016')
As I have a record for each period (month / year) , should return me 01/2016 , 02/2016 , 03/2016 and 04/2016 . But this search is wrong because returns record where the period is 01/2015 and the other a period unwanted
Could anyone help me solve this select? Received on Mon Apr 25 2016 - 16:04:00 CEST