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



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

Answer / 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

More Dot Net General Interview Questions

why you wouldn't want to write into it even if you could

0 Answers  


How to get the hostname or IP address of the server?

2 Answers  


When we use windows api in .net is it managed or unmanaged code?

0 Answers  


Difference between class and interface in .net?

0 Answers  


What is common language specification (cls)?

0 Answers  


Name some of the languages .NET support?

3 Answers  


What is the difference between override and overload in a method?

0 Answers  


What is a formatter in .net?

0 Answers  


Explain how garbage collection works?

0 Answers  


where are connection strings stored?

1 Answers   Manhattan,


What is managed code and managed data in .net?

0 Answers  


Explain about the Common Language Runtime?

0 Answers  


Categories