| Author |
Parse data from a db column.
|
John Tyll
Greenhorn
Joined: Feb 06, 2003
Posts: 10
|
|
|
I have created a java notification app. It works just fine but, requirements changed. Currently, I am selecting the data from an Oracle table that is necessary to send an e-mail, the subject, body, and column E_ADDRESS, which contains 1 e-mail address. The new requirement is to allow this E_ADDRESS column to contain 1 - 5 e-mail addresses. I am not sure how I parse out this data, and I don't seem to find an example on-line. Please help.
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 1855
|
|
You will need some way to delimit e-mail addresses, e.g. a comma. Whoever creates the data record, must place a comma between e-mail addresses stored in a single field. You then read the whole string in the e-mail address column and use a StringTokenizer to chop it up into individual addresses. Another solution: don't store multiple e-mail addresses in one column. Have an e-mail address table indexed to your main table. I know though, you don't always have influence over your data model. We've all been there! :roll: [ February 06, 2003: Message edited by: Greg Charles ]
|
 |
John Tyll
Greenhorn
Joined: Feb 06, 2003
Posts: 10
|
|
Thnaks Greg, It helps to know what to look for.
|
 |
 |
|
|
subject: Parse data from a db column.
|
|
|