I have the following text which I want to search and replace using perl and sed. I would appreciate any help.
Please notice the file contains schema name with a single dot and a double dot . &&WEBDIR_SCHEMA. and &&WEBDIR_SCHEMA .. }
I would like to change it to the acutal schema name.tablename
The schema name in this case will be DSP
Before
SELECT COUNT(*) INTO CTR FROM &&WEBDIR_SCHEMA.SYSPROP WHERE DOMAIN = 'test' AND PNAME = 'svcURL';
SELECT COUNT(*) INTO CTR FROM &&WEBDIR_SCHEMA..SYSPROP
WHERE DOMAIN = 'test' AND PNAME = 'MaxConnectionsHost';
After
SELECT COUNT(*) INTO CTR FROM DSP.SYSPROP WHERE DOMAIN = 'test' AND PNAME = 'svcURL';
SELECT COUNT(*) INTO CTR FROM DSP.SYSPROP
WHERE DOMAIN = 'test' AND PNAME = 'MaxConnectionsHost';
To keep the forums high quality for all users, please take the time to format your posts correctly.
Use Code Tags when you post any code or data samples so others can easily read your code.
You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags and by hand.)
Avoid adding color or different fonts and font size to your posts.
Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.