File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saving list of strings to one column?

 
rick collette
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using db2. I am wondering if it is possible
to save a list of strings to one column of a table?
I can create another table which stores a list of rows
containg individual strings and a foreign key to its parent
table.But I think its overkill to do so. It would be
much simpler just to save a list of strings to one column.
Is it possible?
thanks
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can just concatenate the Strings using the overloaded "+" operator.
 
rick collette
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. But this is not what I wanted.
I guess I will create a child table for that if there is no better soulution.
Originally posted by Jeffrey Hunter:
You can just concatenate the Strings using the overloaded "+" operator.
 
Brahim Bakayoko
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a nested table or an object column type or concatenate the strings with an abitrary delimiter. Then, use a StringTokenizer to get the individual strings when retrieved.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic