![]() |
|
|
|
|
|||||||
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do I view a jpeg? | dsstamps | UNIX for Dummies Questions & Answers | 0 | 05-14-2008 10:25 AM |
| How to view my IP | blowFish@ubuntu | UNIX for Dummies Questions & Answers | 14 | 05-09-2008 06:35 AM |
| view log files | sak900354 | UNIX for Dummies Questions & Answers | 5 | 06-15-2006 04:26 AM |
| DBM View | schafferm | UNIX for Dummies Questions & Answers | 1 | 08-06-2002 01:18 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
sed to fix view names
I have a ddl file which have lots of view in it. I want to replace all the existing views with VW_< view name> . I am prefixing VW to existing view name .
For example, In old file grep on view is like this CREATE VIEW OPSDM001.PROVIDER_MBR_PRI ( MBR_PRI_PROV_SYS_ID, MBR_PRI_COS_PROV_SPCL_CD, CREATE VIEW OPSDM001.PROVIDER_REF ( REF_PROV_SYS_ID, REF_COS_PROV_SPCL_CD, CREATE VIEW OPSDM001.PROVIDER_SRVC ( SRVC_PROV_SYS_ID, SRVC_COS_PROV_SPCL_CD, but after editing , I want the result like this CREATE VIEW OPSDM001.VW_PROVIDER_MBR_PRI ( MBR_PRI_PROV_SYS_ID, MBR_PRI_COS_PROV_SPCL_CD, CREATE VIEW OPSDM001.VW_PROVIDER_REF ( REF_PROV_SYS_ID, REF_COS_PROV_SPCL_CD, CREATE VIEW OPSDM001.VW_PROVIDER_SRVC ( SRVC_PROV_SYS_ID, SRVC_COS_PROV_SPCL_CD, It could take care of any number of view occurance . Any help is appreciated , Thanks in advance , |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks Frankiln but its making VW_ changes to all the table names too in the file. I need VW_ only for view names.
If my original file is like this , create table opsdm001.dim_date create view opsdm001.dim_date_view then i want to change it to create table opsdm001.dim_date create view opsdm001.VW_dim_date_view but with your suggestion, the table name is also prefixed with VW_ Thanks again , |