I ran across a question on StackOverflow, I did not understand the full scope of the question; however, I added my answer. We run into
Category: SQL Code Snippets
SQL code snippets and examples.

Example of SQL injection.

In .Net we are familiar with Try/Catch blocks and you can do this in SQL Server running SQL transactions as well with the additional benefit

Every so often I need to test something with remote device processing, today happens to be one of those times. I could print some barcodes,

I needed to replicate a character 24 times in one instance and in another I had to prefix a value with leading zeros (total of

After copying a database the ASP.Net Membership permissions might not be set for the user you are trying to connect to resulting in the error:

I have a string value in a column in my table. It’s a full path and filename for a .tif image. I needed to get

I recently needed a lookup table of all 50 US states (and Washington DC) and the provinces / territories in Canada. The script below will

At times we copy a SQL Server database from one database name to another for testing or development. One thing that doesn’t change is the

I found an example that used syntax where I could find the average based on a group count. In this case, the group by is