wood burning stoves 2.0*
The moose likes JDBC 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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "adding text to one column" Watch "adding text to one column" New topic
Author

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:
FirstName1,FirstName2,FirstName3,FirstName4,...
(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
 
Similar Threads
I need some help
Getting Last Record in Jtable
HELP !! problem with setparameter in entitymanager
help with getting the table name from the user input
can you put multiple words in a database by using one statement