If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

updating splited values in a recordset

In this field i have coma separeted values. For example like 10,20,30,40,etc...

And i wanna delete one of this values. (Only 1 value) Lets say it is the value 20.

Now, i do send this value (the 20) with form via method post.

So what i need is, to delete the "20" there. of course i know this is not a real "delete" process. Cause i dont wanna delete whole row or field. Just the one value which i send. So this is more a "update" process.

How should i do that ? I mean how must be selection from the field, the split etc...

Shortly, the record which was 10,20,30,40 (same field and coma separeted)
must be updated to 10,30,40 in the end.

That is a *terrible* design. You should *NEVER* put a delimited list of values into a single database field.

Instead, you should have ANOTHER table where you put ONE value per record.

This is called NORMALIZATION. Google for the many many many articles about it.

********

If for some reason you can't redesign the database--if it's a database you have no control over--then you are in for some really UGLY coding. But, yes, it is possible. Just a lot of work.

Well it isnt a bad DB or DB design. But its a complex data and in the end of the day i need to do this. Cant explain now so long why it must be like this. But be sure there is for now no other way for me.

I guess i will take the whole field, spilt the values and pull out the value i need, delete and update the field again with values which must be stay there. But yea its kinda complex work.

If anybody has a shortcut for this process i would appricate for sharing. Tnx.

Delimited fields in databases are the biggest mistake that amateur database designers make.

But if you aren't interested in improving your design (and your overall performance times!) then yes, what you are saying you will do is a hacky and ugly but workable answer.

Your 2 replies, sorry but just useless comments. It seems to me very clear that u are even not able to give a answer to my question. You are not obligated to give a answer or else. Also after your posts i dont wanna also a idea or comment from you.