It is possible using ‘with recursive’. The following is ugly and inefficient but might give you some ideas.
with recursive cte (x,str) as (select 0,?1 union select x-1,substr(?1,x-1) from cte limit length(?1)) select str from cte where substr(str,1,2)='/*' order by -x limit 1; ________________________________ From: sqlite-users <[email protected]> on behalf of Bart Smissaert <[email protected]> Sent: Friday, December 6, 2019 11:59:06 PM To: SQLite mailing list <[email protected]> Subject: Re: [sqlite] last occurrence of /* I think it can be done. Just dealing with the forward slash. RBS On Fri, Dec 6, 2019 at 11:49 PM Simon Slavin <[email protected]> wrote: > On 6 Dec 2019, at 11:00pm, Bart Smissaert <[email protected]> > wrote: > > > How do I select the part of this statement starting with the last /* ? > > Not in SQLite. Do it in your code, or write your own function to do it > and load this function into SQLite. > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

