Hi All,
I need to extract the object names used from the definition using SQL.
CREATE TABLE V(DEFINITION VARCHAR2(100));
INSERT INTO V VALUES('CREATE OR REPLACE VIEW PRODUCER_V AS SELECT * FROM PRODUCER P LEFT JOIN PROD P1 ON P.ID=P1.ID');
INSERT INTO V VALUES('CREATE OR REPLACE VIEW PRODUCER_FTR_V COMMENT='**' AS SELECT * FROM PRODUCER_V P LEFT JOIN PROD P2 ON P.ID=P1.ID');
COMMIT;
SELECT * FROM V;
I can do a plain select using LIKE operator to find the pattern. Here all i am looking for an exact match and display the matched word if found.I have looked into regular expressions but no luck in finding the exact one.
e.g
1)If i am searching for a word 'PRODUCER' , it's exact match is available in the first row and second row has a partial match which i don't need.
Appreciate if you any pointers.
Thanks
KVB