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

What is Assembly?

1 Answers   DELL, Wipro,


How will you load an assembly which is not referenced by current assembly?

0 Answers  


where are connection strings stored?

1 Answers   Manhattan,


Why SOAP is required?

0 Answers   Alcatel-Lucent,


How to implement getcommon method in class a? Are you seeing any problem in the implementation?

0 Answers  






Should I use readerwriterlock instead of monitor.enter/exit?

0 Answers  


How to customize the trace output?

0 Answers  


What's typical about a windows process in regards to memory allocation in .net?

0 Answers  


Is .NET a runtime service or a development platform?

2 Answers  


Explain cas (code access security)?

0 Answers  


How would ASP and ASP.NET apps run at the same time on the same server?

1 Answers  


What is common language specification (cls)?

0 Answers  


Categories