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!

Identify record when specific column value changes in select query

user13373990Dec 18 2015 — edited Dec 18 2015

     I want to know if there is any way in SQL to identify a particular record if some column values changes

Ex:

TableA

IDDESIGCOMP
1ASTABC
1ITADEF
2SEGHI
3ASE-TJKL
3ASEMNO

suppose if i use select query like this : select id,<<chgflag>>, desig, comp from TableA;

i need out put like

1 TRUE AST ABC

1 FALSE ITA DEF

2 TRUE SE GHI

3 TRUE ASE-T JKL

4 FALSE ASE MNQ

basically i want to set the flag is true if id changes. and flase if not in order.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2016
Added on Dec 18 2015
6 comments
5,841 views