SQL Language (MOSC)

MOSC Banner

Group Sorting of data

edited Sep 19, 2020 5:03AM in SQL Language (MOSC) 5 commentsAnswered

Hi,

My Database version is Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production.

I have table data as below. Sample table scripts and sample insert data attached.

****Use only sql to get the below case****

select * from XXIFF_SNR_TEST where subcontr_agrt_no='5073-SCA-004' order by SUBCONTR_AGRT_NO,boq_line_id;

                                                                                                                                                                                                                                                                                                                                                                 

I need to generate extra one row above to the data of each main_desc and the sorting should not change.

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