Well to put it, u'r problem seems to be a java one.
use java.util.StringTokenizer which can be used to parse a string based on
specified delimiter. Apparently a good solution would be to write a method
which *unpacks* this type of string and returns an array which u use as u
wish !!!

-amit
 On Wed, 1
Sep 1999, Larry Linville wrote:

> First off, I got a number of servlets that must communicate with
> my database, and I'm currently using JSDK 2.0.
>
> In retrieving a series of columns (or record) from a particular table
> one of my columns is returning a string value of "1,2,3,4".
> Now "1,2,3,4" is the correct entry for the column, but its really supposed
> to be (4) values saved in the same column or string. Now, after having
> "1,2,3,4"
> in my result set, how do I parse it out to say 1 = ? , 2 = ? , 3 = ?, 4 = ?
> etc...  From there I'm looking to println("Value 1 = " + stringValue1);
> println(Value 2 = " + stringValue2); etc
>
> So, I'm looking to divide the different individual values out of my original
> string so that I can give each value its own println or value.
>
> I could put each of the values into their own columns and
> then not worry about having to divide things up.. but in having those
> values range from 1 to 50 while being pretty closely related I don't
> think I want to do that. Also, all my records may have a different
> combination or order for those values.
>
> Thanks...
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

Amit Rustagi
E-mail: [EMAIL PROTECTED]
Office: +91-22-8291261 xtn 2786
Tata Infotech Limited.
Seepz,Andheri
Mumbai-96.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to