"Oliver Peters" on Friday, May 20, 2011 9:47 AM wrote...

> jose isaias cabrera <cabrera@...> writes:
>
>>
>>
>> Greetings.
>>
>> I would like to get a bunch of records of IDs that I already know. For
>> example, this table called Jobs,
>> rec,...,data,...
>> 1,...,aaa,...
>> 2,...,zzz,...
>> ...
>> ...
>> 99,...,azz,...
>>
> [...]
>
>
> What about
>
> SELECT *
> FROM table
> WHERE id BETWEEN 1 AND 99;
>
> greetings
> Oliver

I presented a bad example, Oliver.  My apologies.  I want specific IDs, so 
the WHERE rec IN (1,2,27,33,87) works perfectly.  However, I have one last 
question: if I do this call,

SELECT * FROM Jobs WHERE rec IN (87, 33, 27,2, 1)

the result is 1, 2, 27, 33, 87.  How can I get that specific order?

thanks,

josé

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to