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
I've managed to do it like this:
where(sql
length(product_cd), "=", 4)
Type-safe and extensible way: https://kyse.link/?p=s&i=ucs9UpJeiJAhAc69C9gv
Or simply https://kyse.link/?p=s&i=xtAnYYuk0pDFwymOAi2i
No need to use
ref
in the function arguments. They are references by defaultThank you, will try them