Putting multiple values into a single column is generally considered very
bad database design. It results in the problems you are encountering now.
You will also be unable to use simple SQL to do things like extract all
products belonging to a particular category.
You will have to use script code to extract the value that you desire once
you retrieve it from the database. Look at the VBScript Split function this
can return an array from which you pick the desired element. IE:
aName = Split("nameA|nameB", "|")
aName(0) would contain "nameA"
aName(1) would contain "nameB"
If it is at all possible you should restructure your database to not have
multiple values in a single column. Something like:
table products (product_id,...
table productnames( product_id, productname,...
For each new name you would add an entry to productnames.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"work4u" <ro*****@yahoo.com> wrote in message
news:9c**************************@posting.google.c om...
From my system, it allow product has multi-category, so I need to save
all
category names which one product belong to into one field on a
database,
and record saved like " nameA|nameB|nameC " - seperate by "|".
question 1:
the second time when i update the record for same product name, how to
have a record
like "nameA|nameB"
After multi-category name saved, then, i would like to generate a
navigate name with the link like
home > nameB > name of product
question2:
so how can i retrieved only one name from category field
Please post sample code.
thanks in advance.