Write an StoredProcedure to get the values of a column
within a date range.

Answer Posted / suren

Example:

select col1 from table_name where
(( convert(DateTime,Date_Column1,102) between coalesce
(@Date_Column1,convert(DateTime,Date_Column,102)) and
coalesce(@Date_Column2,convert(DateTime,Date_Column,102))))

//Date_Column: Column in the Table
//Date_Column1: first value of date range
//Date_Column12: second value of date range

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is .net a language?

754


How many namespaces are in .net version 1.1?

820


What is alias ? Is it used in .Net ?

836


How do you view the methods and members of a dll?

824


What is implement a generic action in webapi?

945


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1803


What is 'Common Type System' (CTS) in .NET?

863


What is operator overloading in .net?

796


Describe the Managed Execution Process?

2237


How you apply a theme in whole application in .Net?

818


Explain different types of html, web and server controls.

751


What is difference between .net and .net core?

725


What are the difference bbetween value type & reference types ? Example from .net. Integer & struct are value types or reference types in .net?

702


How do you define the lease of the object in .net?

758


What is DTS and explain the purpose of it?

794