TSQL Challenge on BeyondRelational.COM — Parv The IT Geek

I was asked by one of my junior colleagues to help him with a puzzle he had seen on BeyondRelational.COM which I thought would be a nice challenge. I liked the premise of the scenario and I always liked a challenge decided to show my colleague how I would approach and resolve this problem. IContinue reading “TSQL Challenge on BeyondRelational.COM — Parv The IT Geek”

IF ELSE Control of flow statements — Parv The IT Geek

The IF ELSE statements are one of the most frequently used statement within SQL and control of flow statements are one of the core statements within any programing language. Once you have understood the concept you can easily make powerful scripts. An IF statement is a check to see whether a condition is TRUE andContinue reading “IF ELSE Control of flow statements — Parv The IT Geek”

How to attach AdventureWorks 2012 to SQL Server — Parv The IT Geek

Have you ever wanted to install the sample database (AdventureWorks )provided by Microsoft which a lot of the tutorials and books refer to? Well one of my colleagues has started to learn SQL Server so I thought I would knock up a quick guide for him. The correct classical way is to use T-SQL wouldContinue reading “How to attach AdventureWorks 2012 to SQL Server — Parv The IT Geek”

ABC The best trait of a SQL DBA — Parv The IT Geek

Have you ever wondered what the best trait all super SQL DBAs possess? Well I will tell what the best trait is and an easy acronym to remember it. I had a conversation with one of my colleagues we talked about the different DBAs and System Admins in the company both past and present andContinue reading “ABC The best trait of a SQL DBA — Parv The IT Geek”

Change a database state in SQL — Parv The IT Geek

Have you ever wanted to change a databases state from read only to read write or vice versa? Well I am going to show you how using some easy to remember T-SQL which you will be using repeatedly over time. We received a database from a client the other day and noticed one of myContinue reading “Change a database state in SQL — Parv The IT Geek”

List SQL databases in SQL Server — Parv The IT Geek

Have you ever wanted to list out all the databases you have on a server? Well I am going to show you how to do it quickly and easily. The other day I had completed a migration from a creaky old dinosaur server to a brand new powerful server which always brings a smile onContinue reading “List SQL databases in SQL Server — Parv The IT Geek”

Find todays date & time in SQL Server part 2 — Parv The IT Geek

Have you ever wanted to return the time found in GETDATE or CURRENT_TIMESTAMP to a higher level off accuracy in SQL? Well I am going to show you how. The other day I needed to get the current time to greater accuracy due to the time stamp given to some records and I had toContinue reading “Find todays date & time in SQL Server part 2 — Parv The IT Geek”

Have you ever wanted to convert a US date to UK format using SQL? — Parv The IT Geek

Have you ever come across the situation where you have data in US format and need it changed to UK format? Well I am going to show you how to use SQL to easily reformat the date. I have had this problem several times in the past dealing with international clients who supply databases withContinue reading “Have you ever wanted to convert a US date to UK format using SQL? — Parv The IT Geek”

Find todays date and time in SQL Server — Parv The IT Geek

Have you ever wondered how to get the current time and date within SQL Server? Well I am going to show you two easy methods of getting this information. The first method is my preferred method as it’s slightly shorter than the second method. SELECT CURRENT_TIMESTAMP Originally published at https://parvtheitgeek.com on February 9, 2014.

Length of LOB data (95563) to be replicated exceeds configured maximum 65536 — Parv The IT Geek

Have you ever had the above error message? Wondered how to sort it out? Well I am going to show you how. Today I was confronted by the above error when a test migration database which was setup with replication was loaded with simulated data. The migration source environment was not replicated so I didContinue reading “Length of LOB data (95563) to be replicated exceeds configured maximum 65536 — Parv The IT Geek”