• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

adding text to one column

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic