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
Two complementary ceramic components fit together into one complete tile.

SQL SERVER – Alternate to AGENT_DATETIME Function

June 2, 2017
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

This Alternate to AGENT_DATETIME converts integer date and time values without calling an msdb function. I preserve leading zeros in the time.

Read More
SQL Audit Collection - Log File Viewer.

SQL SERVER – SQL Audit Date Time Does Not Match Machine Date Time – Solution

May 9, 2017
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL DateTime, SQL Scripts, SQL Server

A bank DBA noticed SQL Audit log times did not match the server clock. Here is why the audit time looks off and how to see it in local time.

Read More
Database backup process.

SQL SERVER – Powershell Script – Remove Old SQL Database Backup Files from Azure Storage

February 17, 2017
Pinal Dave
SQL Tips and Tricks
PowerShell, SQL Azure, SQL Backup and Restore, SQL DateTime, SQL Scripts, SQL Server

My backups to Azure kept piling up. Here is the PowerShell script I wrote to remove old SQL database backup files from Azure Storage automatically.

Read More
SELECT Cast As Date.

SQL SERVER Puzzle – Conversion with Date Data Types

January 1, 2017
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Scripts, SQL Server

Converting values with CAST can round in ways you don’t expect. A puzzle on Date Data Types: guess the output of each query before you run it.

Read More
SQL SERVER - System Function @@IDLE to Find System Ideal Time

SQL SERVER – System Function @@IDLE to Find System Ideal Time

November 26, 2016
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Running @@IDLE returns a number that is hard to read. Here is what this system function measures and how to turn it into idle time you can understand.

Read More
A freshly shaped bowl rests on a drying rack before the next pottery step

How to Introduce Time Delay Between Two T-SQL Commands? – Interview Question of the Week #091

October 2, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL DateTime, SQL Function, SQL Server

How do you introduce a Time Delay between two T-SQL commands? An interview question developers ask often, answered with WAITFOR DELAY.

Read More
Gouache painting of a trimmed date fruit on a cutting board with the trimmings in a small red dish

Change in Date Format: Why LEFT Turns GETDATE Into Text

September 20, 2016
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A change in date format shows up when you apply LEFT to GETDATE: the date goes from year first to month name first. This puzzle explains the implicit conversion behind it, how language settings change the text, and how to get the date you want on purpose.

Read More
Previous 1 … 5 6 7 8 9 10 11 … 29 Next
  • Books
  • Testimonials
  • Privacy Policy

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