Prepare for your Next Interview
This is a discussion on question within the SQL forums, part of the Databases category; suppose enp table has 20 records .there i want to retrieve records i.e employees having date of birth as 1 st day of the month or last day of ...
|
|||
|
question
suppose enp table has 20 records .there i want to retrieve records i.e employees having date of birth as 1 st day of the month or last day of month
|
| The Following User Says Thank You to jayanth511 For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: question
Try this
select * from employee where to_char(dateofbirth,'dd') in ('01',to_char(last_day(dateofbirth),'dd')); Last edited by susarlasireesha : 03-05-2008 at 06:13 AM. |
|
|||
|
Re: question
Before posting these kind of questions please post what / how you have tried from your side to solve it and if you are facing any problem. That will be more interactive.
|
|
|||
|
Quote:
Hi Jayanth.. Please write a procedure for your requirement like the 1 st day of month. The procedure should contain the variable @temp(@temp stores the data for the day of the query, like @temp=select day(DOB) from emp). Now you can check the condition) I think it may help you but you check the result by using trial end error method. Thank You. Regards, Sharavanan S |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HR question | sakshi_2801 | Brainteasers | 2 | 2 Weeks Ago 01:50 AM |
| HR question | sakshi_2801 | Companies | 5 | 09-21-2008 05:19 PM |
| Question | Manoj.Oracle | Oracle Apps | 2 | 03-10-2008 08:54 AM |
| Question | padmakrishna | Java | 0 | 01-22-2008 04:04 PM |
| Question | shitalpatil | Brainteasers | 3 | 03-08-2007 07:32 AM |