Hi there
Just wondering how I would use Heidi to find multiple uses of a particular word in Data view and replace it with another word without having to manually do each one....
Many thanks
Jamie
finding & replacing
Normally, you would write an UPDATE query in a "Query tab".
But I'm currently working on issue #2979. When this is done, you can hit Ctrl+R for a "Search + Replace" dialog (or Ctrl+F for "Find" mode), and replace specific text in rows. This replacement is done on the rows you have either in the "Data" tab, or in a editable query result from one table. You can even apply regular expressions with callbacks there, make the search case insensitive and so on.
But I'm currently working on issue #2979. When this is done, you can hit Ctrl+R for a "Search + Replace" dialog (or Ctrl+F for "Find" mode), and replace specific text in rows. This replacement is done on the rows you have either in the "Data" tab, or in a editable query result from one table. You can even apply regular expressions with callbacks there, make the search case insensitive and so on.
Will take some more days.
However, you should definitly make yourself familiar with some SQL stuff if you use HeidiSQL. The more you know about SQL, the less critical is it to click "somewhere".
The "Query" tab is the rightmost one of the main tabs. Click on it, write some SQL code into the editor and press F9 or the blue arrow button to execute it.
Look at the following query:
This would modify all rows with a "from_str" literal in mycolumn1, replacing it with "to_str".
Be careful, this applies to the whole table, so this is very powerful and probably executed within a few milliseconds after having pressed F9.
However, you should definitly make yourself familiar with some SQL stuff if you use HeidiSQL. The more you know about SQL, the less critical is it to click "somewhere".
The "Query" tab is the rightmost one of the main tabs. Click on it, write some SQL code into the editor and press F9 or the blue arrow button to execute it.
Look at the following query:
UPDATE mytable SET mycolumn1=REPLACE(mycolumn1, 'from_str', 'to_str')
This would modify all rows with a "from_str" literal in mycolumn1, replacing it with "to_str".
Be careful, this applies to the whole table, so this is very powerful and probably executed within a few milliseconds after having pressed F9.
Please login to leave a reply, or register at first.