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 the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
What is scope and visibility in PL/SQL?
What are the differences between in and exists clause?
Why are sql stored procedures used?
What is the use of prepared statement?
Is sql low level language?
Write a unique difference between a function and a stored procedure.
Is grant a ddl statement?
Can we create a trigger on view?
what is commit? : Sql dba
What are the two types of periodical indexes?
What does <> sql mean?
How do I upgrade sql?
Does access use sql?