0

I'm working with a longtext column with these kinds of entries:

:2:;:33:;
:11:;:40:;
:3808:;
:472:;:45:;

What I need to do is replace the first set of numbers (2, 11, 3808, 472) with the result of another query, but leave the rest of the field intact. For example, if I wanted to replace the four examples above with the number "6", it would look like this:

:6:;:33:;
:6:;:40:;
:6:;
:6:;:45:;

I have looked at the ALTER TABLE command, but I'm not sure it's the right choice for this application. Thanks in advance!

  • look for UPDATE. but actually you should change your table design – juergen d Jun 12 '16 at 00:36
  • Have a read on data normalization. Whether they are [Junction Tables](http://stackoverflow.com/a/32620163) or more simple relation tables, you will find a faster and more sane approach using your data the proper way. Just because Sully can visualize the data better the way in your question, doesn't mean the db engine will process it even 1/10 as fast that way. – Drew Jun 12 '16 at 02:45

0 Answers0