please bar with my english
i having a database called tblhallreservation in which
res_date is date field
has to select all the fields in table deponding on month
either has to display all details for the month jan or feb
and so on



please bar with my english i having a database called tblhallreservation in which res_date is dat..

Answer / kiran bala rath

select datename(mm,res_date),* from Tablename order by
convert(int,right(left(convert(varchar,res_date,105),5),2))
asc

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Can a table have 2 foreign keys?

0 Answers  


How to handle errors in Stored Procedures.

2 Answers   Accenture,


You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?

0 Answers  


What is the use of group by clause?

0 Answers  


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

0 Answers  






How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?

0 Answers  


how can u select the Distinct values in the table, table having 20 columns , i want all columns

2 Answers  


how to invoke a trigger on demand? : Sql server database administration

0 Answers  


How do you read transaction logs

1 Answers  


Hi..here i would like to know the Backup and Restore models?

2 Answers   HCL,


What are the types of indexing?

0 Answers  


Which virtual table does a trigger use?

3 Answers  


Categories