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 - UDF - Get the Day of the Week Function

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

July 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Utility

Get the day of the week as a name in SQL Server: a UDF using DATEPART with CASE, plus the simpler DATENAME(dw, GETDATE()) a reader suggested.

Read More
ISDATE function in SQL Server.

SQL SERVER – Validate Field For DATE datatype using function ISDATE()

July 12, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A CSV import crashed on the date 30/2/2007. Use the ISDATE() function to validate a VARCHAR column in a staging table before moving rows to a DATETIME field.

Read More
SQL SERVER - 2005 - List All Stored Procedure Modified in Last N Days

SQL SERVER – 2005 – List All Stored Procedure Modified in Last N Days

July 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Stored Procedure

A query on sys.objects to list every stored procedure modified in last N days, or ones created lately. I use 7 days; change it to what you need.

Read More
A clock showing current date and time.

SQL SERVER – Retrieve Current DateTime in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}

June 21, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

There are three ways to retrieve the current datetime in SQL SERVER.
CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}

Read More
SQL SERVER - Delay Function - WAITFOR clause - Delay Execution of Commands

SQL SERVER – Delay Function – WAITFOR clause – Delay Execution of Commands

June 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

The WAITFOR clause delays a batch, stored procedure or transaction until a set time or for an interval. I use it daily after restores. DELAY and TIME examples.

Read More
SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice

SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice

June 10, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL DateTime, SQL Function, SQL Scripts, SQL Server

The best way to select only the date part from a DATETIME value: my team member’s DATEADD and DATEDIFF method, and the CONVERT style 111 method I prefer.

Read More
SQL SERVER - UDF - Function to Display Current Week Date and Day - Weekly Calendar

SQL SERVER – UDF – Function to Display Current Week Date and Day – Weekly Calendar

June 8, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

A script and UDF that show each current week date with its day, from Sunday to Saturday, using DATEPART and DATEADD. Handy for a weekly calendar report.

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

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