Are you any good at using Regular Expressions in the SQL Assistant find/replace dialog? If so, help, please!

Tools & Utilities
Fan

Are you any good at using Regular Expressions in the SQL Assistant find/replace dialog? If so, help, please!

I cannot successfully use the Find pattern in the the Replace pattern insider of SQL Assistant's Find/Replace dialog.

Yes, I have the Regular Expressions checkbox ticked. :-)

All of the regular expression (RE) handler with which I'm familiar --many Unix shell command processors, Unix utilities, the vi editor and Microsoft SQL Server Management Studio-- allows me to use the FIND pattern in the REPLACE text.

I am able to perform use RE patterns and find the drop-downs list at the end of the FIND text box useful.

However, search as I might, I cannot find any examples of how the regular expression features are *supposed* to work in SQL Assistant. It is very well possible this capability is not there.

I would very much like to stop copy my code into, say, vi or Microsoft's SQL Server Management Studio and then pasting it back after performing the RE find/replace there.

NOTE: before you provide me with an example of RE in SQL per se, keep in mind that to do this for the SQL I'm trying to edit would require my escape any and all quotes in the SQL and then unescaping them all after performing the RE function. In other words, if you are proposing a SQL statement to me, you may very well not understand my request.

Finally, as far as I can tell, the Teradata documentation is fairly poorly edited. It's as if whole features go undocumented. I'm hoping I'm just wrong and it is a matter of my being new to Teradata and not "getting" how things are documented. Regardless, I would have expected Google to have propped me up to some extent. Nope. Still can't find what, I fear, was never created: documentation on the use of RE in Teradata SQL Assistant find/replace.

Thanks!

Environment Details

  • SQL Assistant Version: 13.11.0.02 (English), June 3rd 2011
  • Database Version: Teradata 12.00.0328  12.00.03.28A
  • Provider Version: ODBC 13.10.00.06
  • Windows XP SP 3
3 REPLIES
Fan

Re: Are you any good at using Regular Expressions in the SQL Assistant find/replace dialog? If so, help, please!

[ Sorry! I clearly didn't proof this well enough. If the extraneous words are a problem, here is a better corrected copy. (I don't see an edit post and I don't want to delete this post in case someone has already responded.) ]

I cannot successfully use the text which *matches* the Find pattern as part of the Replace(ment) pattern when using SQL Assistant's Find/Replace dialog.

First, yes. I do have the Regular Expressions checkbox ticked. :-) 

All of the regular expression (RE) handlers with which I'm familiar --many Unix shell command processors, Unix utilities, the vi editor and Microsoft SQL Server Management Studio-- allow me to refer to the FIND pattern in the REPLACE text.

I am able to use RE patterns, albeit simple ones, and I find the drop-downs list at the end of the FIND text box is useful.

However, search as I might, I cannot find any examples of how the RE option is *supposed* to work in SQL Assistant.

It is very well possible this capability is not there.

I would very much like avoid the current do-si-do I must perform: 1) copy my code into, say, vi or Microsoft's SQL Server Management Studio , 2) perform the RE find/replace, 3) paste the results back.

NOTE: before you provide me with an example of RE in SQL per se, keep in mind that to do this for the SQL I'm trying to edit would require my escaping any and all quotes in the SQL (e.g., changing ' to '') and then unescaping them all *after* performing the RE function. In other words, if you are proposing a SQL statement to me, you may very well not understand my request.

<snip>

Fan

Re: Are you any good at using Regular Expressions in the SQL Assistant find/replace dialog? If so, help, please!

Well, I've decided it is very likely tagged expressions are NOT possible in Teradata's SQL Assistant.

Fortunately, though, I have found a site that allows me to paste my text and perform complex find/replace with REs:


http://www.gskinner.com/RegExr/

I came across it when I googled "Teradata regular expressions" (for the 20th time!). I found this site:


http://www.undermyhat.org/blog/2009/09/overview-of-online-regular-expression-testers/

which led me to my new favorite site, above.

I others find this site as useful as I have so far.

-- 

DISCLAIMER: I do not know the people behind either of these sites and I derive no benefit from providing this information.

( Well, other than that pleasant "look-at-what-I-found-I-hope-you-like-it-too" buzz you get when you share something you know. )

Enthusiast

Re: Are you any good at using Regular Expressions in the SQL Assistant find/replace dialog? If so, help, please!

Hi Hugo,

If you want to perform simple Find and Replace function; then you should check out teradata sql assistant as of as I know for now;( other Teradata tools might also does the same) 

On the Above the Main menu at under Edit Menu-> Find and replace( A->B) or shortcut option is ctrl+H- Does help your job.

Hope this helps,

kiran.