By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 2,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

Extracting web address

P: 74

I have a table in my database that contains free text fields for our customers. Somewhere embedded in the descriptions are web addresses that I want to extract. I need a query that pulls out these adresses and puts them in a website field on the same record. I'm guessing I would have to search for www in a block of text.
Nov 14 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,494
What I think you'll need is a function (WebAddr) which returns the web address.
It will need to search for 'http' first (including http:// & https://) and, only if not found, search for 'www.'.
You can use InStr() to find the position in the string.
Any space OR the end of the string can be used to find the end and you can set the return value using Mid().
Nov 14 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.