Tag Archives: sql server

Remove Characters in String T-SQL with No Loop Part 2

Okay, expanding on what I did yesterday. I Built a table, called ExclusionList with one field, ExcludedText E.g. Then created a function: You can then use like this:

Posted in Programming | Tagged , , , , | Leave a comment

Remove Characters in String T-SQL with No Loop

Ok, I’ve seen many ways to do this using loops, but nothing in plain T-SQL Let’s say we have a string that may contain illegal characters, in my case it was project identifiers that needed to be used as file … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

Showing Two Different Scales on Y Axis SQL Server Reporting Services (SSRS)

Long time, no post… I was asked to create a graph showing throughput of bags on a conveyor grouped into 5 minute intervals. ¬†One of the requirements was to show two scales on the Y axis, bags / 5 minute … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Search for Value in Multiple Columns SQL Server T-SQL

Having to write some SQL SELECT’s on some un-normalized tables left me thinking there has to be a tidier way. I started with: (@SCAN_ID is a variable declared earlier) I ended up with: Maybe not a massive improvement, but personally … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Browse for SQL Server 2008 R2 Installation Media

When running the SQL Server Installation Centre I was receiving the above error. This seems to be caused by the software being installed to a temp folder which is subsequently deleted post install. Mine had been installed from a folder … Continue reading

Posted in Programming | Tagged , , | 2 Comments

SQL Server 2008 R2 Maintenance Cleanup Task Not Deleting bak Files

I noticed that my old backup files were not being deleted despite my Cleanup Task being set to delete all bak files more than a day old. Having checked, and double checked the path, file age, etc. I decided it … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Multiple OR’s in T-SQL WHERE Condition SQL Server

Just been rewriting some SQL Server stored procedures for a client. There were a lot of SELECT statements like the one below: I’ve seen this quite a few times, and I’m not suggesting this is wrong, however I find that … Continue reading

Posted in Programming | Tagged , , , | Leave a comment