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

Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

0 Answers  


What is the difference between server.transfer and response.redirect? Why?

0 Answers  


Is string a value type or a reference type?

4 Answers  


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

0 Answers  


Explain the Scope of public/private/friend/protected/protected friend.

1 Answers   Wipro,


what is prototype design pattern in .net

0 Answers   Infosys,


What is .net latest version?

0 Answers  


Explain the main components in .net?

0 Answers  


How does cas works?

0 Answers  


What is use of ContextUtil class?

1 Answers  


State the various features present in .NET?

0 Answers  


Can we have same method with same name and signature using partial classes

1 Answers  


Categories