"Trey Mack" beautifully wrote...
> Is this what you're after?
>
> create table LSOpenJobs (PSubClass);
> insert into lsopenjobs values ('DOC-Trans');
> insert into lsopenjobs values ('DTP');
> insert into lsopenjobs values ('PM');
> insert into lsopenjobs values ('Post-Proc');
> insert into lsopenjobs values ('Pre-Proc');
>
> select * from lsopenjobs
> order by case psubclass
> when 'Pre-Proc' then 1
> when 'Post-Proc' then 2
> when 'DOC-Trans' then 3
> when 'DTP' then 4
> when 'PM' then 5
> end;
Yes. Thanks.
>
>
> jose isaias cabrera wrote:
>> Greetings.
>>
>> I would like to have the results of a select be returned sorted in an
>> specific way. Let me show you what I mean:
>>
>> sqlite> SELECT PSubClass FROM LSOpenJobs WHERE subProjID = 2190 GROUP BY
>> PSubClass;
>> DOC-Trans
>> DTP
>> PM
>> Post-Proc
>> Pre-Proc
>> sqlite>
>>
>> What I would like is to have the SELECT result be,
>>
>> Pre-Proc
>> Post-Proc
>> DOC-Trans
>> DTP
>> PM
>>
>> is this possible? Yes, I know I can sort it in the program, but how can
>> I
>> get this special sort from the DB?
>>
>> thanks,
>>
>> josé
>>
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> [email protected]
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users