I want to display the employees who have joined in last two
months. (It should be executed randomly means If I execute
the query in March it should display Jan and Feb joined
employees. Same query if i execute in Feb, 2007 it should
display dec, 2006 and jan 2007 joined employees.
Answer Posted / balaji s.t
select convert(varchar(10),
dateadd(dd,-(day(dateadd(mm,1,getdate()))-1), dateadd(mm,-2,getdate())), 120),
convert(varchar(10),dateadd(dd,-(day(getdate())),getdate()),120)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what is self join and what is the requirement of self join? : Sql dba
How to use boolean type in select statement?
how to get a list of all tables in a database? : Sql dba
What is nosql example?
What is the purpose of my sql?
How do I make sql search faster?
Can a commit statement be executed as part of a trigger?
What are sql ddl commands?
Explain what is table in a database?
What view means?
What is pl/sql table? Why is it used?
What is sql profiling in oracle?
What are the types of variables use in pl sql?
What does fetching a cursor do?
what does the t-sql command ident_current does? : Transact sql