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!

Update Table with maximum of a column and sequence

4243516May 1 2020 — edited May 2 2020

HI ALL,

I have a requirement on below table wherein I need to update the  table with columns  SFX and SEQ as in first I need to take maximum of SEQ and when its value reaches 99 i need to make SFX Column value to 02 and SEQ to 01. Please help me with th plsql procedure and update commands in it to achieve this.

Output as of now

Network
PDF_PID
LOC
SFX
SEQ
MGCN10020101
MGCN10030102
MGCN100230199
MGCN100210101
MGCN5010102

Expected Output as below:

NETWORK
PDF_PIDLOC
SEQ
SFX
MGCN10020101
MGCN10030102
MGCN100230199
MGCN100210201
MGCN5010101

pLEASE ELP!!!

Comments
Post Details
Added on May 1 2020
17 comments
1,021 views