|
-
Nov 19th, 2012, 01:00 PM
#1
Thread Starter
New Member
Email Extraction for Database String
I have no idea how to do this, i have used the Slpit method but that did not work well, my issue is , i am doing a read on an sql databse and my strings are being returned as the following 3 ways
firstname Lastname ([email protected])
firstname Lastname ([email protected]);firstname Lastname ([email protected])
[email protected];[email protected];[email protected]
Some have 1 to 8 email addresses per- line, and i need to run a task on each extracted email address, if i can atleast get posted in the right direction on methods to research, or sample codes, would be great.
-
Nov 19th, 2012, 01:50 PM
#2
Re: Email Extraction for Database String
Hello,
Most likely this is not what you want to hear but best to fix the structure of the table i.e. First Name column, Last Name column then one column for email addresses delimited or even better a table for email addresses that have a foreign key from the main table.
Otherwise you at some point no matter how well you think your code can split up data something will not go as expected. Best to clean up data as per above.
-
Nov 19th, 2012, 01:53 PM
#3
Thread Starter
New Member
Re: Email Extraction for Database String
the problem is more the users input to the database, i could change and moify the DB, but the users will keep putting in that way unless you have a method to make sure the email column only displays email address's. cause there is columns for forst name, last name, phone, address, email, however the Email address column displays like my examples. i have only been with this company for a couple weeks and this is the type of stuff i walked into
-
Nov 19th, 2012, 01:59 PM
#4
Re: Email Extraction for Database String
 Originally Posted by ShanneL
the problem is more the users input to the database, i could change and moify the DB, but the users will keep putting in that way unless you have a method to make sure the email column only displays email address's. cause there is columns for forst name, last name, phone, address, email, however the Email address column displays like my examples. i have only been with this company for a couple weeks and this is the type of stuff i walked into
If it were me I would (in the best venue possible i.e. meeting, emails etc) bring up to the users that if they don't enter data properly then you cannot guarantee data can be extracted cleanly. Many times being new in a company allows you to have a good deal more control than one would think.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|