sql - How to extract tuples from a table using the projection criteria as month name in oracle? -


i have table 'emp' schema defined as(empno, ename,hiredate) ,i trying project out names of employees joined in moth of january , wrote below query not printing records ,it works fine if don't use clause , else not working .

select ename emp ( to_char(to_date(extract(month hiredate),'mm'),'month')) 'january'​ 

please guide me making mistake .

it unnecessarily complicated.

try run select:

select hiredate,extract(month hiredate) emp  

then if january 1 select , there arent mistakes, can use:

select ename emp extract(month hiredate)=1 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -