What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table

Answer Posted / chinnu

Hi SQL gurus,

i am working for an MNC...

My team is having a problem in sql server. when user slects
date prompts from jan 1st to april 30, it should display
all months data like :

jan aa
feb bb
mar cc

but when it comes to april its taking data like :

jan aa
feb bb
mar cc
apr dd...and so on

means its taking data again from jan to april which we dont
want. we want the data only april month as we are getting
jan, feb and mar...

can any one write the code to relsove the issue please

would be greatful if you can send to shiva_sans@yahoo.co.in

and also please send your email also ...so that we will be
in touch for any kind of queries ...


Thanks a lot in Advance !!!

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What stored procedure can you use to display the current processes?

713


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

759


Where is trigger in sql server?

781


What is executereader?

766


Why would you call update statistics?

813


Explain what are various ways to enhance the ssrs report?

850


What are the recovery models in sql server 2000?

760


Where can you find the error log information? : sql server database administration

810


Explain alternate key, candidate key and composite key in sql server?

719


Which command is used for user defined error messages?

818


What are the limitations in ssrs on sql server express edition?

160


What is a view in sql?

801


Explain the creation and execution of a user-defined function in the sql server?

845


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

808


What is blocking?

764