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

Can u explain me What is encapsulation?

7 Answers   Deloitte, GK companies,


What is WSDL? Explain its architecture?

0 Answers   Amdocs,


what is the keyword used for self reference?

0 Answers  


What is a strategy pattern? Implement it.

1 Answers  


What is the difference between response.write & response.output.write?

0 Answers  






what is the use of "mustinherit" keyword?

2 Answers  


how to connect database connectivity in dotNET? if suppose SQL server?and also MS access?

8 Answers  


What is marshling?

0 Answers  


Explain the Difference between value and reference type.

2 Answers   Infosys, Wipro,


Which file is taken by compiler when we have both file Application and Server Configuration file?

0 Answers  


What does jit do?

0 Answers  


What is the purpose of IClonable interface in .NET?

0 Answers   Sans Pareil IT Services,


Categories