> 1. This will work if you always have a select statement.
> If (in some
> cases) there is no select statement, it will return the
> whole string.
> That is why I usually go with REFind/Mid.
Although if he's using regex to get the column list, it's a safe bet
that it will only ever be used on a select statement, since you don't
have a column list with insert, delete or update statements.
> 2. If you are looking for a column list, I would also add
> some \s in the
> regexp:
> "^.*?SELECT\s(.*?)\sFROM\s.*$"
> If you don't, a statement like this will get you in
> trouble:
> SELECT MAILTO, MAILFROM, MAILSUBJECT, MAILMESSAGE FROM
> TBL_MAIL
Good catch.
s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- REFind Help ... Charles Heizer
- Re: REFind Help ... Charles Heizer
- RE: REFind Help ... Pascal Peters
- Re: REFind Help ... S . Isaac Dealey
- Re: REFind Help ... Adam Haskell
- RE: REFind Help ... Pascal Peters
- RE: REFind Help ... Pascal Peters
- Re: REFind Help ... Adam Haskell
- S . Isaac Dealey