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

What is managed code and managed data in .net?

594


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

593


What is difference between .net and .net core?

550


Please explain what is the difference between odbc and ado?

528


What are the features of dot net?

538






How to create properties and methods using controls?

592


Please explain when should you use .net web forms over asp.net mvc?

550


which methos do you invoke on the dataadapter control to load your generated dataset with data?

555


What is singlecall activation mode used for in .net?

574


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

591


Is .net 4.8 backwards compatible?

549


What is cyclomatic complexity and why is it important?

1721


What are the new thee features of com+ services, which are not there in com (mts)?

519


What is garbage collection in .net? Explain the garbage collection process?

568


Interop Services?

1460