Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Help with a query RE: Help with a query
pietlinden
SSC Guru
Points: 63435
More actions
June 29, 2015 at 9:21 pm
#1808963
Sounds like you need a table for this:
The order is B,BB, A, AA, AAA, & AAAA.... something like
CREATE TABLE LoookupTable(
stringValue CHAR(4) PRIMARY KEY,
Seq TINYINT NOT NULL UNIQUE
);
then you'd join to that and order by Seq.