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

Will it go to finally block if there is no exception happened?

0 Answers  


Explain difference between panel and groupbox classes using .net?

0 Answers  


What do the terms “boxing” and “unboxing” mean?

0 Answers  


Please explain is the jit an interpreter?

0 Answers  


Which ports are used by virueses?

1 Answers  






Please explain what is the difference between encrypting a password and applying a hashing?

0 Answers  


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

0 Answers  


What is the base class of Button control?

2 Answers  


What is PageIndex in DataGrid?What is the event used in the Datagrid for while moving from one page to another page in the Grid?write code for it

2 Answers  


What is namespaces in .net?

0 Answers  


What is il in vb.net?

0 Answers  


What are the different.net tools which you used in projects?

0 Answers  


Categories