Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

create table with fields ID, reserved_by,res_date
res_date is datefield like 2010-03-09 00:00:00.000 from
2005 to 2006 any date assume
based on res_date need to slect table and display
based on month (full jan details in database irrespective
of date and year

Answer Posted / anilkumar manthena

select * from <Table> where datepart(month,res_date)=1
It will return all the reservations made on Month "January".

Ex:
SELECT DATEPART(month, '2009-02-13 18:35:06.523')
retrieves the value 2.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to name query output columns in ms sql server?

946


Will sql server 2005 allow you to reduce the size of a column?

966


What is sql server replication? : sql server replication

960


Explain in brief about Microsoft SQL server?

1065


What are the High-Availability solutions in SQL Server and differentiate them briefly?

1123


Explain error and transaction handling in sql server?

990


What does REVERT do in SQL Server 2005?

943


Explain sql server authentication modes?

1110


Explain cdc and sql injection?

956


Is oracle faster than sql server?

933


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

1003


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

907


What is the Main Difference between ACCESS and SQL SERVER?

1113


What is the difference between locking and multi-versioning?

972


What are the advantages of using stored procedures in sql server?

995