Code:
rem Subset Rows (&&tempName.*)
CREATE VIEW &&tempName.* AS
SELECT a a,b b,c c,d d,e e,f f,
g g,h h,i i,j j,k k,l l,
m m,n n,o o,p p,q q,r r,
s s,t t,u u,v v,w w,x x,
y y,z z,a a,b b,c c,d d,
e e,f f,g g,h h,i i,j j,
k k,l l,m m,n n,o o,p p,
q q,r r,s s,t t,u u,v v,
w w,x x,y y,z z,X1 X1, X2 X2,
X3 X3, X4 X4, X5 X5, X6 X6, X7 X7, X8 X8, X9 X9, X10 X10,
X11 X11, X12 X12, X13 X13, X14 X14, X15 X15, X16 X16,
X17 X17, X18 X18, X19 X19, X20 X20, X21 X21, X22 X22,
X23 X23, X24 X24, X25 X25, X26 X26, X27 X27, X28 X28,
X29 X29, X30 X30
FROM &&tempName.*
WHERE f is not null
I have written the follwoing program using perl but its not working.
perl -i -pe 's/
rem Subset Rows (&&tempName.*)
CREATE VIEW &&tempName.* AS
SELECT *
FROM &&tempName.*
WHERE f is not null/
rem Subset Rows (&&tempName.*)
CREATE VIEW &&tempName.* AS
SELECT a a,b b,c c,d d,e e,f f,
g g,h h,i i,j j,k k,l l,
m m,n n,o o,p p,q q,r r,
s s,t t,u u,v v,w w,x x,
y y,z z,a a,b b,c c,d d,
e e,f f,g g,h h,i i,j j,
k k,l l,m m,n n,o o,p p,
q q,r r,s s,t t,u u,v v,
w w,x x,y y,z z,X1 X1, X2 X2,
X3 X3, X4 X4, X5 X5, X6 X6, X7 X7, X8 X8, X9 X9, X10 X10,
X11 X11, X12 X12, X13 X13, X14 X14, X15 X15, X16 X16,
X17 X17, X18 X18, X19 X19, X20 X20, X21 X21, X22 X22,
X23 X23, X24 X24, X25 X25, X26 X26, X27 X27, X28 X28,
X29 X29, X30 X30
FROM &&tempName.*
WHERE EGTESTCD is not null/g' xyz_abc.sql