Write a query to find the name of employees those who have
joined on Monday.(based on column hire_date)
Answers were Sorted based on User's Feedback
Answer / prasant
SELECT FIRST_NAME,LAST_NAME FROM employees
where TRIM(TO_CHAR(TO_DATE(HIRE_DATE),'DAY'))='MONDAY';
if any issue,contact me.
Is This Answer Correct ? | 48 Yes | 8 No |
Answer / kiran kumar
SELECT * FROM EMP
where TRIM(TO_CHAR(TRUNC(HIREDATE),'DAY'))='SUNDAY'
Is This Answer Correct ? | 23 Yes | 7 No |
Answer / kavitha nedigunta
select ename
from emp
where trim(to_char(Hiredate,'day')) ='monday'
Is This Answer Correct ? | 19 Yes | 5 No |
Answer / ajit nayak
SELECT *
FROM EMP
WHERE TO_CHAR(HIREDATE,'FMDAY') = 'MONDAY';
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / nitin umale
SELECT last_name,TO_CHAR(hire_date, 'Day,dd-Mon-yy')Hire_date
FROM employees
WHERE UPPER(TRIM(TO_CHAR(hire_date, 'day')))='MONDAY';
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / ajeet
select last_name,to_char(hire_date,'day,mm,yyyy')
from employees
where trim(to_char(Hire_date,'day')) ='monday'
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / mahendar reddy
SELECT ENAME FROM EMP WHERE TO_CHAR(TO_DATE(HIREDATE),'D')='2';
IT fetch the employee name who joined on monday
Here
1=sunday
2=monday
--
---
--
--
--etc
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / chaitu
select ename,to_char(hiredate,'Day') from emp
where trim( to_char(hiredate,'Day'))='Monday'
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / emmanuel
Select * from emp
Where to_char(TO_DATE(hire_date),'day')='monday';
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / venkat
Select first_name,Last_name
from employees
where To_date('HIREDATE','D')=2;
1-SUNDAY
2-MONDAY
----
7-SATURDAY
The advantage of the above query even don't know about the
format of day of the week We get the output.
Monday,
MON
MONDAY
ETC
Is This Answer Correct ? | 6 Yes | 7 No |
I have a table .in the table 100 recored is there .we have get the single row with out using clause..
how to include character strings in sql statements? : Sql dba
What are user defined stored procedures ?
What is the purpose of my sql?
what is innodb? : Sql dba
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
What are pl/sql cursor exceptions?
How toimport .dmp file in lower version of oracle from higher version ?
What is a full join sql?
when is the use of update_statistics command? : Sql dba
Can there be more than one function with a similar name in a pl/sql block?
What is sql and also describe types of sql statements?