Click here to Skip to main content
15,884,628 members
Home / Discussions / Database
   

Database

 
GeneralRe: A query with lot of inner queries Pin
indian14330-May-14 9:08
indian14330-May-14 9:08 
GeneralRe: A query with lot of inner queries Pin
Jörgen Andersson30-May-14 9:24
professionalJörgen Andersson30-May-14 9:24 
GeneralRe: A query with lot of inner queries Pin
indian14330-May-14 9:05
indian14330-May-14 9:05 
GeneralRe: A query with lot of inner queries Pin
Mycroft Holmes30-May-14 12:46
professionalMycroft Holmes30-May-14 12:46 
QuestionProblem with tempdb - MSSQL Pin
Milan K SK28-May-14 4:32
Milan K SK28-May-14 4:32 
AnswerRe: Problem with tempdb - MSSQL Pin
Kornfeld Eliyahu Peter28-May-14 6:39
professionalKornfeld Eliyahu Peter28-May-14 6:39 
QuestionSQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 11:10
Seuss27-May-14 11:10 
AnswerRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Mycroft Holmes27-May-14 12:45
professionalMycroft Holmes27-May-14 12:45 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 20:10
Seuss27-May-14 20:10 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Mycroft Holmes27-May-14 20:22
professionalMycroft Holmes27-May-14 20:22 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 22:14
Seuss27-May-14 22:14 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
NitinDhapte16-Jun-14 1:55
NitinDhapte16-Jun-14 1:55 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 22:28
Seuss27-May-14 22:28 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Mycroft Holmes27-May-14 22:55
professionalMycroft Holmes27-May-14 22:55 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 23:00
Seuss27-May-14 23:00 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss28-May-14 5:28
Seuss28-May-14 5:28 
AnswerRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Chris Quinn27-May-14 22:53
Chris Quinn27-May-14 22:53 
GeneralRe: SQL Server 2012 Agent Job & stored procedure issue URGENT Pin
Seuss27-May-14 23:01
Seuss27-May-14 23:01 
QuestionHow to select the records who are completed exactly years comparing with joining date and todays date Pin
ven75326-May-14 6:09
ven75326-May-14 6:09 
Hi,

I have mysql database and employee details table is there with the column joining date.

i need to write a query in mysql in such a way that i should compare joining date with today date since i need to display employee details who are going to complete exactly 1 yr, 2 yr , 3yr ... and so on.

For ex:
Joining_Date Current_Date Years_Completed
2010-05-26 2014-05-26 4 years
2000-05-26 2014-05-26 14 years
2010-04-26 2014-05-26 4 years this row should not come since one month is less

only for todays date they should exactly complete years

How to achieve this. If anybody knows, please reply me.

Thanks in advance.
AnswerRe: How to select the records who are completed exactly years comparing with joining date and todays date Pin
jschell26-May-14 8:11
jschell26-May-14 8:11 
GeneralRe: How to select the records who are completed exactly years comparing with joining date and todays date Pin
ven75326-May-14 21:27
ven75326-May-14 21:27 
AnswerRe: How to select the records who are completed exactly years comparing with joining date and todays date Pin
Mycroft Holmes26-May-14 12:52
professionalMycroft Holmes26-May-14 12:52 
GeneralRe: How to select the records who are completed exactly years comparing with joining date and todays date Pin
Sunasara Imdadhusen26-May-14 21:30
professionalSunasara Imdadhusen26-May-14 21:30 
AnswerRe: How to select the records who are completed exactly years comparing with joining date and todays date Pin
NitinDhapte16-Jun-14 2:18
NitinDhapte16-Jun-14 2:18 
Questionaccess2010 pivot table Pin
hakata21-May-14 5:59
hakata21-May-14 5:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.