-
Recent Posts
Categories
Archives
Tag Archives: SQL Server
Should I use OUTER JOIN instead of NOT EXISTS?
NOT EXISTS in a query can readily be replaced by an OUTER JOIN. Here is how This is because of the fact that in an LEFT OUTER JOIN every row in the left table is represented in the result set, … Continue reading
Posted in Programming, SQL
Tagged Execution time, Instead, NOT EXISTS, OUTER JOIN, Performance, Query, SELECT, SQL, SQL Server, SQL Server 2005, SQL Server 2008
Leave a comment
SQL function to remove extra multiple spaces from string
Here is a very efficient solution for removing multiple spaces from a string. I mean replacing multiple spaces between words in a string with a single space, without using a loop. The technique is very simple, I will just run … Continue reading
Posted in Programming, SQL
Tagged between, extra, function, multiple, remove, replace, script, single, spaces, SQL, SQL Server, string
11 Comments
Generate random and unique alphanumeric code in SQL
The key to generating large number of random and unique alpha numeric code is to generate all of it in one go. Store all the codes in a file or a table and server the requested amount of codes whenever … Continue reading
Posted in Programming, SQL
Tagged 10 digit, 6 digit, 8 digit, alphanumeric, code, generate, million, random, script, SQL, SQL Server, unique
8 Comments
Convert string to ASCII
A simple SQL function I created to convert a string to ASCII values. This function is build as per my requirements but you can modify it to get desired results. For example you can replace with to get a delimited … Continue reading
Posted in Programming, SQL
Tagged 2000, 2005, 2008, SQL, SQL Server, VARCHAR to ASCII
Leave a comment