Forums Register Login

Parse data from a db column.

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
Thnaks Greg,
It helps to know what to look for.
look! it's a bird! it's a plane! It's .... a teeny tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 813 times.
Similar Threads
retriving bit from Database
retriving bit from Database
Update XML to CLOB
using multiple table from a database in a JSP
How to parse the content(mail body) of email using java mail API
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 10:14:29.