Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract date and name in Oracle sql

user12251389May 3 2022 — edited May 3 2022

I have `prg_tbl` table in which i insert filenames from directory in the column `Filename` and values are stored in column `Filename` as :

TRG_jira_creditentity_20220426.csv
TRG_jira_CRL_Boni_20220426.csv
TRG_jira_CRL_Branchen_20220426.csv
TRG_jira_CRL_Counterparty_20220426.csv
TRG_jira_CRL_KNE_20220426.csv
TRG_jira_CRL_Länder_20220426.csv

In one select query i want to extract date from this rows for example `'20220426'`. And in another select query i want to extract filename for example `'TRG_jira_creditentity_'`.
I am not sure how to do this using select query as the dates from filename gets changes but the prefix which is part of filename it remains static for example `'TRG_jira_creditentity_'`.

This post has been answered by Gianni Ceresa on May 3 2022
Jump to Answer
Comments