Skip to Main Content

SQL & PL/SQL

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!

RANK() / DENSE_RANK() - Analytical Functions

Luiz AraujoDec 2 2015 — edited Dec 2 2015

Hi guys:

I need to create a double loop to ZIP files in a determinated directory. Also, I need to separate them by Extension and YearMonth. So I started to think on have 2 distincts rankings, one of them based on the Extension of the filename (and I need it to be dynamic to support any kind of file that appears in the directory) and the other with a ranking based on Rank_By_Extension+YearMonth

I have a table that contains the following structure:

FILE_NAMEEXTENSIONBASE_NAMEYEARMONTHZIP_NAMERANK_BY_EXTENSIONRANK_BY_EXTENSION_PLUS_YEARMONTH
MYFILE_20150110.TXTTXTMYFILE201501TXT_MYFILE_201501.ZIP11
MYFILE_20150113.TXTTXTMYFILE201501TXT_MYFILE_201501.ZIP12
MYFILE_20150218.TXTTXTMYFILE201502TXT_MYFILE_201502.ZIP13
MYFILE_20150310.CSVCSVMYFILE201503CSV_MYFILE_201503.ZIP21
MYFILE_20150111.XMLXMLMYFILE201501XML_MYFILE_201501.ZIP31
MYFILE_20150118.XMLXMLMYFILE201501XML_MYFILE_201501.ZIP32
MYFILE_20151126.DATDATMYFILE201511DAT_MYFILE_201511.ZIP41
MYFILE_20151201.DATDATMYFILE201512DAT_MYFILE_201512.ZIP42
MYFILE_20150517.TXTTXTMYFILE201505TXT_MYFILE_201505.ZIP14

My table has the fields in blue populated and I need to fill these 2 others fields, Can anyone help me?

Regards.

Luiz Araujo

This post has been answered by Paulzip on Dec 2 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2015
Added on Dec 2 2015
3 comments
394 views