Click here to Skip to main content
15,881,852 members
Home / Discussions / Database
   

Database

 
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 
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 
Hi,

Try below :
SQL
DECLARE @JoiningDate DATE
SET @JoiningDate = '10/10/2013'

IF (YEAR(GETDATE()) > YEAR(@JoiningDate))
    BEGIN
	IF (DAY(@JoiningDate) = DAY(GETDATE()) AND DAY(@JoiningDate) = DAY(GETDATE()))
	    BEGIN
                /*
                This will exceute on every year of joining date.
                Below is the print statement to check the testing result.                                
                */
	        PRINT CONVERT(NVARCHAR,(YEAR(GETDATE()) - YEAR(@JoiningDate))) + ' Year(s)'
	    END
    END

Questionaccess2010 pivot table Pin
hakata21-May-14 5:59
hakata21-May-14 5:59 
QuestionAbnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
jugnu_ad20-May-14 20:52
jugnu_ad20-May-14 20:52 
AnswerRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Richard MacCutchan20-May-14 21:45
mveRichard MacCutchan20-May-14 21:45 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
jugnu_ad20-May-14 21:47
jugnu_ad20-May-14 21:47 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Richard MacCutchan20-May-14 22:26
mveRichard MacCutchan20-May-14 22:26 
AnswerRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Tim Carmichael21-May-14 1:35
Tim Carmichael21-May-14 1:35 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
jugnu_ad21-May-14 1:45
jugnu_ad21-May-14 1:45 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Simon_Whale21-May-14 1:50
Simon_Whale21-May-14 1:50 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
jugnu_ad21-May-14 1:56
jugnu_ad21-May-14 1:56 
AnswerRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Eddy Vluggen21-May-14 7:52
professionalEddy Vluggen21-May-14 7:52 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Mycroft Holmes21-May-14 12:51
professionalMycroft Holmes21-May-14 12:51 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Tim Carmichael22-May-14 3:41
Tim Carmichael22-May-14 3:41 
GeneralRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Eddy Vluggen22-May-14 5:10
professionalEddy Vluggen22-May-14 5:10 
AnswerRe: Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure Pin
Shameel22-May-14 3:05
professionalShameel22-May-14 3:05 
Questionhow to updat a column from start point Pin
mhd.sbt20-May-14 0:59
mhd.sbt20-May-14 0:59 
AnswerRe: how to updat a column from start point Pin
Shameel20-May-14 1:19
professionalShameel20-May-14 1:19 
GeneralRe: how to updat a column from start point Pin
mhd.sbt20-May-14 1:35
mhd.sbt20-May-14 1:35 

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.