I assume YEAR is an Integer number, best practice would be to have a column type as data, and get the year using the YEAR function in SQL.
SELECT CONSUMER_NUMBER
FROM CONSUMER_INFO
WHERE YEAR(Data) =2014
AND CONT = 'USA'
AND ROWNUM = 1 ;
Something like this, but anyway I don’t think this is the problem with your query, can you prinscreen the error?
PS : Also if your YEAR column is varchar or anything like that don’t forget you have to use ''
;
0
solved How to add Multiple AND conditions in SQL query?