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.