Thanks Leonel, that sounds interesting, I will take a look.
Greetings.
El 23/04/18 a las 11:30, Leonel Câmara escribió:
I would make a function that automatically generated case statements
for the orderby
|
defmake_orderby(idlist):
result="CASE"
fori,el inenumerate(idlist):
resul
I would make a function that automatically generated case statements for
the orderby
def make_orderby(idlist):
result="CASE"
for i, el in enumerate(idlist):
result += " WHEN id = %d THEN '%d' " % (el, i)
result += " ELSE id END ASC"
return result
I have not tested th
Thanks Anthony, I will go with the first option and guess how to adapt
it to postgress too.
Greetings.
El 22/04/18 a las 12:12, Anthony escribió:
On Sunday, April 22, 2018 at 11:46:13 AM UTC-4, Carlos Cesar Caballero
wrote:
Hi guys, I have a list of ids, and I need to obtain the records
On Sunday, April 22, 2018 at 11:46:13 AM UTC-4, Carlos Cesar Caballero
wrote:
>
> Hi guys, I have a list of ids, and I need to obtain the records keeping
> the list order. In MySQL I can use FIELD() in the "order by" for that.
> Can I get the ordered records using the DAL?
>
The DAL doesn't hav
4 matches
Mail list logo