September 10, 2003

Sorting SQL Results in Your Own Preferred Order

USE PubS– Sort Each of PubName in Natural Alphabetic Order but push A’s to thelastselect * from publishersOrder by (CASE left(Pub_name,1) WHEN ‘A’ THEN 1000 ELSE ASCII(pub_name)END)–Sort Publishers By City

International Test for Illegal Characters

Windows has the solution: the IsCharAlphaNumeric function, defined in User32.dll. This function uses the currently defined locale when performing comparisons, thereby allowing full use of accented characters. This sample demonstrates

Explicit Constructors

A constructor that takes a single argument is, by default, an implicit conversion operator, which converts its argument to an object of its class, the keyword “explicit” can be placed