Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find/Replace tool to change suite of queries

Status
Not open for further replies.

kq

Programmer
Aug 15, 2001
39
0
0
US
Our DBAs have made a change in logic to one of the dimension which, when used through BO is not an issue; however, many of our queries are in freehand sql and we're having to manually update each one (approx 100).

Is there an automated tool of any kind that could do a find/replace function?
 
Hi,
What kind of Verbage are you talking about?

Single Words,
Multiple words on the same line
Multiple Words across multiple lines?

Can you give us an example of what you need to change?

You can probably write a PERL script to do the modification of this sort. I have done that before.

----
 
Here's the original language:
sum(CASE WHEN ((D.covg_typ_cntg_ind = 'Y' and C.sub_mth_cnt in ('-1','1') ))
THEN C.sub_mth_cnt ELSE 0 end) AS CNT

Here's the change:
sum(CASE WHEN ((D.covg_typ_cntg_ind='Y' and C.sub_mth_cnt in ('-1','1') [RED]and D.prod_var_age_cd ='1'[/RED] )) THEN C.sub_mth_cnt ELSE 0 end)

This is the logic behind a measure we use CONSTANTLY -- but many of our queries are in freehand sql -- a long, sad story.
 
Hello. I have been using a wonderful tool called wingrep to do advanced searches (and replace). It's available at wingrep.com You can use regular expressions to perform your search. A wonderful tool!
 
Thank you both Bridgeconsultant and Lysen for your assistance. Now the job will be to get something past "Dr NO" as we call our IT guys!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top