The Curious Consultant
Menu Close
  • Home
  • Here’s everything!
    • C#
    • SQL
    • General
    • Code
      • C# Code
      • JavaScript/TypeScript Code
      • SQL Code
    • Tips and Techniques
      • C# Tips and Techniques
      • Nintex Form Tips and Techniques
  • About Dave
  • My Blogs
  • Contact Me Anytime!

sql

1

SQL: get max length of values in every table column

Posted on July 11, 2017 by David Lozinski
SQL Code

SQL to get max length of values in every table column I had an issue to resolve once upon a time where data could not be loaded into a table because “string or binary data would be truncated”. The target… Continue Reading →

Code, SQL Code max length, sql
0

SQL: “Watchdog” loop to start and monitor SQL Agent Jobs

Posted on January 16, 2017 by David Lozinski
SQL Code

SQL “Watchdog” loop to start and monitor SQL Agent Jobs This runs an SQL “Watchdog” loop to start and monitor SQL Agent Jobs. There are just a few configurable items that you can adjust to suit your needs: The “Wait… Continue Reading →

Code, SQL Code agent job, sql, watchdog
1

SQL: Rebuild Indexes, Update Statistics, and Shrink Databases on SQL Server

Posted on September 12, 2016 by David Lozinski
SQL Code

SQL to Rebuild Indexes, Update Statistics, and Shrink Databases Here is SQL to Rebuild Indexes, Update Statistics, and Shrink Databases on SQL Server. This code works on SQL Server 2008 – 2016. It should help keeping your databases running at… Continue Reading →

Code, SQL Code Indexes, Shrink Database, sql, statistics
2

Tricky C# and SQL Interview Questions

Posted on April 10, 2016 by David Lozinski

Tricky C# and SQL Interview Questions for mid-to-senior level Positions A few readers have left private comments asking me what kinds of interview questions I’ve asked potential candidates. Personally, I have a lot more fun with mid-to-senior level positions as… Continue Reading →

General .Net, C#, Interview Questions, sql, Tricky Questions
11

SQL: LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX

Posted on October 7, 2015 by David Lozinski
SQL Code

LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX All too often developers need to query a database table for records which begin and/or end with a certain textual pattern. For instance, find all employees where their first name begins with “DAV”.… Continue Reading →

SQL CHARINDEX, LEFT, LIKE, RIGHT, sql, substring
7

SQL: Fastest way to insert new records where one doesn’t already exist

Posted on July 21, 2015 by David Lozinski
SQL Code

Fastest way to insert new records where one doesn’t already exist SQL Developers come across this scenario quite often – having to insert records into a table where a record doesn’t already exist. The age-old technique and I suspect most… Continue Reading →

SQL Except, Exists, insert, Join, Left Join, Merge, Not Exists, sql
6

SQL: Fastest way to compare multiple column values

Posted on March 3, 2015 by David Lozinski
SQL Code

Fastest way to compare multiple column values I was recently working on a project with stored procedures that had a significant amount of column comparisons in a MERGE statement. This was turning into a real performance bottleneck (relatively speaking) as… Continue Reading →

SQL Binary_Checksum, Checksum, Concat, Hashbytes, sql, Stuff
8

Optimizing SQL Strategies

Posted on May 21, 2014 by David Lozinski
SQL

Optimizing SQL Strategies How many of you have come across SQL code that, for whatever reason, wasn’t written as good as it could have been? I’m not talking about going into the inner workings of your database’s engine and milking… Continue Reading →

SQL @Table Vars, #TempTables, optimize, sql, SQL optimizing, strategies

Subscribe to be notified of new posts!

Most Popular Last 30 Days

  • SQL: Fastest way to insert new records where one… (4,994)
  • C# .Net: Fastest Way to Read Text Files (1,481)
  • Fastest Collection for String Lookups in C# .Net (1,231)
  • The Fastest Way to Read and Process Text Files using C# .Net (1,015)
  • C# .Net: Fastest Way to check if a string occurs… (957)

Categories

Latest Comments:

  • Arin Taylor on SQL: LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX
  • Ig Go on Optimizing SQL Strategies
  • Jamie Marshall on SQL: Fastest way to insert new records where one doesn’t already exist
  • Douglas Kirschman on SQL: Fastest way to insert new records where one doesn’t already exist
  • Alita on C#: Fastest Way To Check Last Character of a String

Recent Posts

  • C#: Ints Vs Stringified-Ints
  • C# ConvertTo Vs Parse
  • JavaScript-TypeScript for Nintex Forms to Validate File Names
  • C# logging data technique
  • C#: Dictionary Vs ConcurrentDictionary

Everything Else!

Here's Everything if you're trying to find a post, missed some, or just want to see, well, everything. :-)
© 2019 The Curious Consultant. All rights reserved.
Hiero by aThemes
Do NOT follow this link or you will be banned from the site!