I'm trying to retrieve a list of account numbers (...
# orm-help
m
I'm trying to retrieve a list of account numbers (strings) and sort them by the last 6 characters (which are integers) descending. Is there a way in Prisma (Prisma 2, specifically) to sort by a substring or do I need to write raw SQL for this particular function?
r
Hey @Matt 👋 You would have to use
prisma.raw
for this as substring sorting is not available.
✔️ 1
m
Thanks Ryan, I ended up doing exactly that yesterday and got it to work.
👍 1