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

Explain the difference between managed and unmanaged code?

471


What is Flyout Design Pattern in .NET?

652


What is the purpose of IClonable interface in .NET?

614


What is STA in .NET?

651


Difference between value type & reference types ?

609






what will do to avoid prior case?

601


What is strong-typing versus weak-typing? Which is preferred?

559


What is connected and diconnected database ?

600


Name the classes that are introduced in the system.numerics namespace.

643


Tell us the differences between an interface and an abstract class in .net?

576


What is concurrency? How will you avoid concurrency when dealing with dataset?

607


What is a manifest in .net?

619


What are the purposes of using .net?

616


Should I implement finalize on my class? Should I implement idisposable?

556


What are the new features of Framework 1.1 ?

3835