This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - 2008 - SQL Server Start Time

SQL SERVER – 2008 – SQL Server Start Time

June 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SQL Server 2008 records when it started in sys.dm_os_sys_info. One SELECT of sqlserver_start_time gives you the SQL Server start time. It does not work on 2005.

Read More
SQL SERVER - SQL SERVER - UDF - Get the Day of the Week Function - Part 4

SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function Part 4

June 1, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

In Day of the Week Function Part 4, I answer why I write a UDF when DATENAME exists (I just like it) and show the one line DATENAME version.

Read More
SQL SERVER - SQL SERVER - UDF - Get the Day of the Week Function - Part 3

SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 3

May 27, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Nanda Kumar improved the UDF to get the day of the week: it now uses the date you pass in instead of GETDATE() and handles Saturday correctly.

Read More
SQL SERVER - SQL SERVER - UDF - Get the Day of the Week Function - Part 2

SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 2

May 23, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Mihir Popat improved my Day of the Week Function with @@DATEFIRST, so Sunday does not have to be the first day of the week. Here is his UDF.

Read More
SQL SERVER - UDF to Return a Calendar for Any Date for Any Year.

SQL SERVER – UDF to Return a Calendar for Any Date for Any Year

February 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Reader Dan Golden built on my weekly calendar function to create a UDF to return a calendar for any date for any year. I fixed a small first and last week bug.

Read More
SQL SERVER - Execute Same Query and Statement Multiple Times Using Command GO

SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO

January 9, 2008
Pinal Dave
SQL Performance
SQL DateTime, SQL Scripts

Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.

Read More
SQL SERVER - 2008 - New DataTypes DATE and TIME

SQL SERVER – 2008 – New DataTypes DATE and TIME

December 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SQL Server 2008 adds separate DATE and TIME datatypes, something DBAs wanted for years. I compare them with the SQL Server 2005 way of using DATETIME.

Read More
Previous 1 … 13 14 15 16 17 18 19 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com