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 report rendering ?

162


Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

1003


How to change server name in sql server?

1244


What is the default port for SQL Server over a firewall?

1141


What according to you is the difference between mysql and sql server performance?

1140


Can we use having clause without group by?

1025


What is query cost in sql server?

1037


What are some examples of schemas?

1020


Where the sql logs gets stored? : sql server database administration

1012


why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration

1131


Write a sql query to display the current date?

1142


What do you understand by recursive stored procedure?

984


why would you use sql agent? : Sql server database administration

1266


What are the reporting services components?

144


What do you mean by collation recursive stored procedure?

1106