Re: how to deal with a string of categories

2004-07-26 Thread SGreen
ks like we can pass some parameters to it too (like SEPARATOR) > > thanks, > Mojtaba > - Original Message - > From: [EMAIL PROTECTED] > To: Mojtaba Faridzad > Cc: [EMAIL PROTECTED] > Sent: Monday, July 26, 2004 11:15 AM > Subject: Re: how to deal with a string

Re: how to deal with a string of categories

2004-07-26 Thread Mojtaba Faridzad
pass some parameters to it too (like SEPARATOR) thanks, Mojtaba - Original Message - From: [EMAIL PROTECTED] To: Mojtaba Faridzad Cc: [EMAIL PROTECTED] Sent: Monday, July 26, 2004 11:15 AM Subject: Re: how to deal with a string of categories May I suggest a design c

Re: how to deal with a string of categories

2004-07-26 Thread SGreen
May I suggest a design change as a solution? I would suggest that you should create a user/category table to replace your "catstr" field: CREATE TABLE user_category ( user_Id int not null, category_Code char(1) not null UNIQUE (user_Id, category_Code) ) There will be one record in the user_categ

Re: how to deal with a string of categories

2004-07-26 Thread Brent Baisley
You should never create multi-purpose fields that you will need to use to reference other data, which is what you did here. The database can't use an index because the "codes" are not in set positions. You need to create a table for linking the categories with "mytable", since you are trying to

Re: how to deal with a string of categories

2004-07-26 Thread Martijn Tonies
Hi, > I'd like to know how you guys write SQL command for this problem. there are > some categories which I give them "A", "B", ... and I have a string field > (catstr) with 10 characters in "mytable" to keep selected categories in a > record. when user selects "C", "G", "K", I keep "CGK" in "cats

how to deal with a string of categories

2004-07-26 Thread Mojtaba Faridzad
Hi, I'd like to know how you guys write SQL command for this problem. there are some categories which I give them "A", "B", ... and I have a string field (catstr) with 10 characters in "mytable" to keep selected categories in a record. when user selects "C", "G", "K", I keep "CGK" in "catstr" fiel