Home Menu
  • Home
  • About – Tomas Lind
  • Contact
  • Blog Series
    • Technical Analysis (TA)
  • T-SQL
    • T-SQL Scripts
    • Templates
  • Consulting Services
  • Software
Tomas Lind

Posts in Category ‘Tips & Tricks’

  • 2016/12/08
  • 0 comments

Identity columns that are about to overflow

Identity columns are widely used as primary key columns in SQL Server tables. They can be one of the data types TINYINT, SMALLINT, INT, BIGINT, NUMERIC or DECIMAL. Each of these data types has an upper limit and when that … Read more →

  • Posted in: T-SQL, Tips & Tricks
  • 2016/06/14
  • 1 comment

Toggl Time entries to SQL Server

Toggl is a very simple to use cloud based time tracking application. Time entries on projects and clients can be submitted through the web page or through mobile and desktop applications. Time spent by the team can be viewed in … Read more →

  • Posted in: PowerShell, Tips & Tricks
  • 2016/05/25
  • 0 comments

Split strings to columns

A short demo on how to split strings with delimiters into columns.

  • Posted in: T-SQL, Tips & Tricks
  • 2015/10/19
  • 0 comments

Send email when log or data file grows

One way to keep track of your data- and log file sizes in SQL Server, is to send an email notification whenever a file growth occurs.

  • Posted in: Monitoring, Tips & Tricks
  • 2015/07/14
  • 0 comments

sys.dm_exec_cached_plans

The dynamic management view sys.dm_exec_cached_plans returns information on query plans currently in memory. This information can be useful for a lot of reasons: checking total memory allowed for cached plans, which plans aren’t getting reused, searching for certain query plan … Read more →

  • Posted in: Dynamic Management Objects, Monitoring, Tips & Tricks
  • 2015/07/07
  • 2 comments

How to fill in gaps in time series

In some cases it is necessary to have an unbroken time series, for instance to have all days during a year. But what if some days are missing from the data? How can we fill in gaps in time series?

  • Posted in: T-SQL, Tips & Tricks
  • 2015/06/30
  • 5 comments

Calculating Earned Premium in SQL Server

In most business, when a company receives payment for a sold product, that payment can be considered an income. But to an insurance company, only the part of the premium that has been earned (Earned Premium) can be considered as … Read more →

  • Posted in: Insurance, Tips & Tricks
  • 2015/06/26
  • 19 comments

Sending HTML tables in mail from SQL Server

This post contains a template for sending HTML tables via mail in T-SQL. A prerequisite is that you have created a Database Mail Profile. If you don’t have an email server available, you can use Gmail instead as demonstrated here.

  • Posted in: Database Mail, T-SQL, Tips & Tricks
  • 2014/12/10
  • 1 comment

Mass editing of SQL Server objects

Ever had the need to replace a piece of code in multiple SQL Server objects (Stored Procedure, Trigger, Function or Views)? Here’s a method to search for a string in all objects, replace it with some other code, and to … Read more →

  • Posted in: Dynamic Management Objects, T-SQL, Tips & Tricks
  • 2014/08/16
  • 0 comments

Max or min value from a set of columns

The min and max aggregates in SQL Server are normally used to work over rows, getting the max or min value from a set of rows. But what if you want to get the max or min value from a … Read more →

  • Posted in: T-SQL, Tips & Tricks
← Older entries

confided data manager

Get compliant with the GDPR!


High Coast Database Solutions

High Coast Database Solutions

sql server consulting services


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Top Posts & Pages

  • How to align columns in Notepad++
  • List SQL server roles by users
  • Manual failover in a SQL Server cluster
  • CDC Cleanup job
  • Calculating Earned Premium in SQL Server

Recent Posts

  • Get element max value from folder with XML files
  • Dynamic Data Masking (DDM) – Mask query results
  • The T-SQL Merge statement
  • From SQL Server to MSMQ using PowerShell
  • Identity columns that are about to overflow

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Instagram

This error message is only visible to WordPress admins

Error: No connected account.

Please go to the Instagram Feed settings page to connect an account.

  • © 2022 Tomas Lind
  • Proudly powered by WordPress
  • Theme: Waipoua by Elmastudio
Top ↑