jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes adding text to one column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "adding text to one column" Watch "adding text to one column" New topic

adding text to one column

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
hello could someone help please
i just wondered if you could put multiple querys into one column for example i have a column name called firstname and i want to put 10 first names in there would i have to write firstname 10 times and then write each value individuly or is there a better way?
thanks for yr time ben
Tina Coleman
Ranch Hand

Joined: Dec 12, 2001
Posts: 150
Do you mean that you want to store in the FirstName column something like this:
(in which case you'd set your FirstName column to be the string created by appending FirstName1 + "," + FirstName2 +"," - the db doesn't care what you really put in the column if it's a text field with sufficient length)
Or do you mean that you want to write a query like this:
SELECT * FROM TableX Where FirstName Like "FirstName1" OR FirstName Like "FirstName2" OR . . .
(also could be written like
SELECT * FROM TableX where FirstName In ("FirstName1", "FirstName2", "FirstName3". . .) - but then you need a precise text match, instead of the ability to do a LIKE query).
I agree. Here's the link: http://aspose.com/file-tools
subject: adding text to one column
It's not a secret anymore!