December 23, 2002 03:23 PM

Sorting in Non-Standard Ways

Rating: (0)
SQL Server Magazine
InstantDoc ID #27505

I have a table called Template containing two fields that I've defined with the following statement:

CREATE TABLE OrderTest
   (template int, template_name varchar(20))
The INSERT statements in Listing 1 show the kind of data this table contains. I need to display the result set so that it's sorted alphabetically by the template_name column, but the row that contains the data template_name = 'generic template' needs to come at the end of the list. How can I meet these criteria?

A Man...

...This article is for paid Professional Members only.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here