Sunday, December 15, 2013

sql get month & year from date



 SELECT   
 OTDate as Date  
 ,CONVERT(CHAR(4), OTDate, 100) as Month   
 ,CONVERT(CHAR(4), OTDate, 120)as Year  
 FROM Payroll_tblEmployeeOTHour  

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...