PL/SQL (MOSC)

MOSC Banner

add counter column in SQL query

edited Sep 5, 2012 2:33AM in PL/SQL (MOSC) 19 commentsAnswered ✓
Hello,
 I want to add counter column in below SQL query...  with below condition

   1. A counter number should be  same for same  logical_filename and when logical_filename value changed counter should be increase as per below example.

incomplete SQL
select                                            
    tit.test_instance_id   test_instance_id,                         
    tit.file_name  file_name,                                
    eb.logical_filename  logical_filename, 
   < add counter column here>                   
from                                              
    ec_blob eb,                                   
    test_info_tag_ext tit                         
where                                             
    tit.test_instance_id = eb.test_instance_id and
    tit.file_name = eb.real_filename 
    and tit.file_name='abc.trc'
order by tit.test_instance_id, tit.file_name, eb.logical_filename;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center