Steve's SQL Page

SQL Connections Fall 2003

Session SDV335: Arrays in SQL 168 KB .zip file
Session SDV327: Do More with SQL 184 KB .zip file
Session SDB418: When Statistics ... 221 KB .zip file

Queries

ConcatenateTrigger.sql.txt 

A reverse Veg-O-Matic table.  You insert individual items in separate rows, and they end up as concatenated lists in single rows.

covariance.sql.txt

Statistics

FindFeatures.sql.txt

Takes a comma-separated list of features and finds items with each one

Infix.sql.txt

SQL 2000 function to evaluate an arithmetic expression (just don't use negative numbers in it)

ISOWeeks.sql.txt

Creates a calendar table with ISO week numbers.  Since I wrote it, someone pointed out to me that there is a simpler version in a BOL example.

LeastSquares.sql.txt

Statistics

ListToTableFunction.sql.txt

Inline table-valued function that takes a comma-separated list and returns a table containing the individual items

ListToTableProc.sql.txt

Procedure that takes a comma-separated list and returns a result set containing the individual items

NameMoney.sql.txt

Function that takes a value of type money and returns it in US English

PivotRename.sql.txt

Inefficient procedure to create a pivot table with correct column names, using sp_rename

PrintHierarchy.sql.txt

Quick indented display of a hierarchy, handy for small tables

SearchAllTables.sql.txt

Searches for a string in all char-type columns of all tables in the database

SelectStarFrom.sql.txt

A procedure to select from a table, given the table name as a string, safe from malicious SQL injection

SkewKurtosis.sql.txt

Statistics

YouAreHere.sql.txt

Displays the path to a particular item of a hierarchy

 

Documents

Using the Microsoft Jet ODBC driver for text files

Other

My Home Page