Showing posts with label Compare Date Store Procedure. Show all posts
Showing posts with label Compare Date Store Procedure. Show all posts

Saturday, January 14, 2012

SQL(compare date store procedure)


--THIS IS USE TO SELECT THE RECORD IN THE GIVEN DATE RANGE--

CREATE procedure StoreProcedureName
@From as nvarchar='',
@To as nvarchar=''
As
Select TableName.ID, TableName.TotalAmount, TableName.TotalDiscount , TableName.NetAmount From TableName  where CONVERT(nvarchar,PostedDate,101) BETWEEN '04-28-2011' AND '04-28-2011'
Go