Money Talk's !
Stay Hungry ! Stay Foolish !
Wednesday, January 19, 2011
Store Procedure using Date Difference
CREATE Proc dbo.ProcedureName @Parameter datatype
AS
Begin
SELECT fieldname,fieldname,DATEDIFF(day, fielddate, GETDATE()) as ABC,fieldname from TableName where DATEDIFF(day, fielddate, GETDATE()) >= @Parameter
End
GO
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment