Hi All,
I struck up extracting of a string satisfying 2 conditions. I have a string and want to extract until a space or new line character is encountered.I m not able to represent the text here .I am able to achieve individual one's but not combinedly.
Here is the data.
e.g.I want to extract the view name, i am finding space between the view keyword and end of the view.sometimes there is a new line character as well.
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'||/n||'AS SELECT * FROM PRODUCER_V P LEFT JOIN PROD P2 ON P.ID=P1.ID');
COMMIT;
SELECT * FROM V;
Appreciate any help on this.