Yesterday was regular expression day. I got asked by three different people about regex search options in SQL Developer. One of those wanted to know how to use them in the Data Modeler.

Scenario: Find all columns which have precision of 9 or less

I know, silly scenario. But I’m not that great with regular expressions, and I needed an easy one to play with.

So this expression [0-9] will match any text that looks like 0 or 1 or 2 or 3 or … 9. Basically, any 1 digit numbers.

I don’t know how to do a search in the modeler to say that data type precision is < 10, so the regular expression works nicely. Regular expression searches are supported in both simple and advanced modes. Now, since I'm searching a specific table element, I'm going to go with advanced. [caption id="attachment_4651" align="aligncenter" width="1000"]Just toggle on the RegEx search flag and you're good to go Just toggle on the RegEx search flag and you’re good to go[/caption]

Hit ‘Find’ and voila:

So many cool things you can do here that I bet you didn't know about...
So many cool things you can do here that I bet you didn’t know about…

It’s not JUST search my friends 🙂

  1. Turn the search results into a report
  2. Change the properties for all of the search results
  3. Navigate to said diagram object

So for example, I can hit the properties button, and change in one swoop every single digit precision defined column to having a precision of 10.

THIS IS POWERFUL/DANGEROUS: will update EVERY item in the search list.
THIS IS POWERFUL/DANGEROUS: will update EVERY item in the search list.

If the properties are common across all of the search result objects, you’ll see the value in the OLD VALUE box. But even if they’re NOT common, you can still change them. I changed them to 10, and hit the dialog box again.

I can see they’re now all 10 and I can change them to 15 if I want. Of course you’re versioning your designs and you can undo these changes at any time, right?

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

1 Comment

Reply To Michael Cancel Reply