![]() |
Delete until end of line
Sample:
sql="select * from table order by id" How do I look at the query statement and remove all the characters starting with "order by" and remove all remaining characters in that line? *** Sent via Developersdex http://www.developersdex.com *** |
Re: Delete until end of line
On Apr 19, 7:53 am, Joey Martin <j...@kytechs.com> wrote:
> Sample: > sql="select * from table order by id" > > How do I look at the query statement and remove all the characters > starting with "order by" and remove all remaining characters in that > line? > > *** Sent via Developersdexhttp://www.developersdex.com*** You could do a string search and remove everything after the word order till you encounter the last double quote .. |
Re: Delete until end of line
Joey Martin wrote:
> Sample: > sql="select * from table order by id" > > How do I look at the query statement and remove all the characters > starting with "order by" and remove all remaining characters in that > line? > > Two techniques: 1. InStr() combined with Left() sql=Left(sql, InStr(sql,"order by") - 1) 2. Regular Expression left as exercise for other posters -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. |
| All times are GMT. The time now is 07:25 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.