K
Kysely13mo ago
kewp

where clause with length

How do I have a where clause with a length, e.g. select * from data where length(prodcode) = 3
4 Replies
kewp
kewp13mo ago
I've managed to do it like this: where(sqllength(product_cd), "=", 4)
wirekang
wirekang13mo ago
Type-safe and extensible way: https://kyse.link/?p=s&i=ucs9UpJeiJAhAc69C9gv
koskimas
koskimas13mo ago
Or simply https://kyse.link/?p=s&i=xtAnYYuk0pDFwymOAi2i No need to use ref in the function arguments. They are references by default
kewp
kewp13mo ago
Thank you, will try them
Want results from more Discord servers?
Add your server
More Posts