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 , , , , , , , , , , | 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 , , , , , , , , , , , | 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 , , , , , , , , , , , | 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 , , , , , | Leave a comment