Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +---------------+
- |abrahadabra.pdf|
- |---------------|
- |some.txt |
- |---------------|
- |Doc.docx |
- +---------------+
- +------+
- |.pdf |
- |------|
- |.txt |
- |------|
- |.docx |
- +------+
- SELECT ( SELECT (substr( d.DOC_FNAME, length(d.DOC_FNAME) - instr('.', d.DOC_FNAME)+1)) FROM dual) AS doctype
- FROM Documents d
- GROUP BY d.DOC_FNAME;
- select substr(DOC_FNAME,-instr(reverse(DOC_FNAME),'.'))
- from table
- select regexp_substr(DOC_FNAME,'.[^.]*$')
- from table
Add Comment
Please, Sign In to add comment