Late Night Dev

Business and Development Resources for Web Developers and Analysts

Archives for the ‘SQL’ Category

The SQL STUFF Function

By Patrick Irvin • Feb 18th, 2009 • Category: SQL

The STUFF Function is used to replace one string in your data with another string.  It deletes a specified length of characters from a string beginning at a specified start position and replaces them with another string beginning at the start position.  The STUFF is very useful when you wish to only replace one specific [...]



Microsoft Release New Tools to Help Web Developers in Fight Against SQL Injection

By Patrick Irvin • Jun 25th, 2008 • Category: ASP.Net Programming, SQL, Security, Tools / Utilities

Published on Website Magazine Blog – 06/25/08

SQL Injection Detection and Defense
Microsoft has released tools to help website developers in their defense against SQL injection on sites that use ASP and ASP.Net technologies. The tools include URLScan 3.0 (which is in beta release) and Microsoft Source Code Analyzer for SQL Injection (MSCASI), available as a Community [...]



Sql Server 2005 Pagination

By Patrick Irvin • Jun 18th, 2008 • Category: SQL

SQL Server 2005’s ROW_NUMBER ranking function allows you to accomplish pagination of your selected set of data.  You need to determine the row number so that you can select a subset of the data.  For instance, you may want to feature 5 articles on your web page.  The first article flagged as featured will be [...]



Retrieve XML from a MS SQL 2005 database

By Patrick Irvin • May 27th, 2008 • Category: SQL

Do you need to retrieve some of your data in XML to take advantage of the ease of sharing data between systems or applications where a complex import procedure is not feasible or maybe you just need a quick and simple XML output. The for XML clause can be used retrieving data from your tables [...]