Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Replace only replacing one instance

timtak's profile image timtak posted 3 weeks ago in General Permalink

I am attempting to search and replace a URL in some text fields (probably the wrong term) in a region of a table but I am having a problem. I select a region of a table, have tried choosing both of the "forward" and "backward" options, and both of the "from cursor" and "entire scope" options, and click replace, but each time only one instance is replaced.

I have NOT tried selecting "global" as opposed to "selection" since I don't want to replace instances in the whole table let alone the whole database.

Does anyone have any suggestions as to why this may not have worked?

I am afraid I have not made a donation.

timtak's profile image timtak posted 3 weeks ago Permalink

I made a small donation (8 euros = 1000 yen). I know that the software is of professional quality and worth much more but I hardly ever use it. My version was from 2011 until I upgraded (for the search and replace) last week.

ansgar's profile image ansgar posted 3 weeks ago Permalink

Don't worry about the donation - it's arbitrary. However, thanks a lot!

Here are some answers to your questions:

  • "Selection" refers to rows you select by mouse, not to the WHERE filter at the top. So if you want to replace all rows matching to your filter, use "Global"
  • if you want to process all rows at once, press "Replace all"
  • pressing "Replace" processes the first one, then you need to press F3 for the next replacements

Description

timtak's profile image timtak posted 3 weeks ago Permalink

Thank you very much indeed, for the response and screen shot too.

I was thinking that the selection would allow me to search and replace in the mouse selected area.

Perhaps I pressed "replace" rather than "replace all"! Silly me.

I will try again. Thanks again.

timtak's profile image timtak posted 2 weeks ago Permalink

Alas, it seems I was not quite that silly as to have pressed Replace as opposed to Replace ALL. I tried again. I want to replace http://md2.cc.yamaguchi-u.ac.jp/~eigo/moodle2/file.php/10/ With https://md2.cc.yamaguchi-u.ac.jp/~eigo/moodle2/file.php/3/

So I selected an area, from the bottom up to leave the cursor at the top, (higher than I had intended, selecting some instances that I had already replaced by hand) chose Direction Forward, Origin "From cursor" (I also tried Entire Scope though I don't know what that means as an "origin") and "Selection" as shown here ![image description](null) And the result was again that only once instance was replaced. image description

Any idea as to what I might be doing wrong?

ansgar's profile image ansgar posted 2 weeks ago Permalink

I just tried the same and realized this is buggy in HeidiSQL! I suppose the "selection" option is confused by what the first replacement does.

Are you on Github? If yes, you should report that as a new issue there.

ansgar's profile image ansgar posted 2 weeks ago Permalink

By the way: you can paste images here in the forum. Also you can attach them using one of the upload buttons.

ansgar's profile image ansgar posted 2 weeks ago Permalink

No matter, I just created issue #1233

ansgar's profile image ansgar posted 2 weeks ago Permalink

... and just fixed for the next build.

timtak's profile image timtak posted 1 week ago Permalink

Thank you very much. I hope the next build is available soon.

timtak's profile image timtak posted 1 week ago Permalink

I see it is already there. I will install it.

Revision 11.1.0.6133 Fix grid search/replace with scope=selection. Closes #1233 Downloads: 32bit build (6.4 MB)64bit build (7.3 MB)32+64bit installer (19.3 MB)

timtak's profile image timtak posted 2 days ago Permalink

It worked. Thank you.

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.