I want to have a default value for my SQL Server 2008 stored proc as below:
Create Process sp_Transactions1
@earliestDate varchar(12)= CAST(DATEPART(YEAR,DATEADD(m,-3, getdate())) AS VARCHAR(4)) + RIGHT('00' + CAST(DATEPART(mm, DATEADD(m,-2, getdate())) AS varchar(2)), 2)+ '01'
As
But it won't compile
Is this not possible?