how can I make a query with only the month and date in SQL

0

As I can do a query in the BD only taking the month and the year of a date, I was trying this but it marks that the month is not valid

SELECT *
       FROM CL_RP_COBRANZA_TNR
       WHERE TO_DATE(FECHA_VENCIMIENTO,'MM/RRRR') = TO_DATE('10/2015','MM/RRRR');
    
asked by Jonathan Garcia 07.08.2018 в 15:47
source

2 answers

0

This is my solution I hope your friend works:

SELECT * FROM CL_RP_COBRANZA_TNR 
WHERE YEAR(FECHA_VENCIMIENTO) = '2015' 
AND MONTH(FECHA_VENCIMIENTO) = '10'
    
answered by 07.08.2018 в 15:53
0

this is the answer of how to perform searches according to the month and year

select * from DUAL
where to_char(CAMPO,'mm/rrrr') = '10/2015';
    
answered by 07.08.2018 в 16:21