I need to extract every thing before last two periods
Following is the sample query I am using but that returns only the characters before first period, but that is not I needed.
SELECT REGEXP_SUBSTR(t.column,'[^.]+',1,1) AS output FROM MY_Table t where t.column is not null and rownum=1
I would use
SELECT REGEXP_REPLACE(t.column, '.[^.]+.[^.]+$', '') FROM MY_table WHERE t.column IS NOT NULL AND rownum = 1;
The regex pattern
.[^.]+.[^.]+$ will match starting with the second to last dot, all content until the end (including also the last dot).