Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I try to read text between two words, I use today TextBetween and it works when I have the second word.
Sometimes I dont have the second word and then it fail to read that line.
In my example I read: textbetween(Statement,'FROM ', 'WHERE' ) and this will give me the datasource, but sometimes ther is no WHERE statment in my query, any Idea?
//Staffan
Can you please post sample data ?
No, but like this:
bla bla lot of text bla bla FROM datasource Where A=B, this works and will give me datasource
bla bla lot of text bla bla FROM datasource, won´t work, gives me nothing.
//Staffan
something similar to
=if(index('$(vText)','where'),
TextBetween('$(vText)', 'from', 'where') // where exists
, SubField ('$(vText)', 'from', 2)) // where doesn't
but what about group by, order by , etc......?
vText is a variable in InputBox
Regards
That works, I have try them all, but not in the same if statment, nice.
You have also a point about group/order by, that will be the next to solve.
//Staffan