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

What is the need for indexing?

886


How to check table values in sql server?

908


what is isolation level at dead lock?

2088


How would we use distinct statement? What is its use?

1022


What is the use of floor function in sql server?

1022


Explain transaction server isolation?

979


Where is localdb stored?

885


What is sql server locking?

936


Explain tables in SQL Azure?

120


According to you what goes into making the best database administrator? : sql server database administration

936


What is catalog views?

1022


Name some of the open source software that you can use in alternative to SSR?

151


What is row_number()?

926


How do you troubleshoot errors in a SQL Server Agent Job?

1005


How to defragment indexes with alter index ... Reorganize?

1023