I routinely need to retrieve and package query result sets in an XML package. The built in functions supported by SQL Server 2000 are effective, but are often more of a pain than a help. This routine can be used in a simple select statement to XML encode the contents of a column during the select process. The UDF is called exactly like RTRIM, LTRIM, or any other string function.
For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.