Skip to content

Tag: oracle

SQL Query/ Assigning Rank

I am interested in SQL query not the PLSQL code. We need to assign the rank based on date and id value Input table should look like below output table should look like below Answer This is a type of gaps-and-islands problem. In this case, the simplest solution is probably the difference of row numbers: Why th…

process/transaction data partitioning

i have problem with partitioning the process data i have from our workflow system. data are stored in database step after step (one step is one row) for couple of processes (id) and a date of the event. in simplified data is looks as follows: what i need to have is such short table the “x” step is…

How to use Replace/Substitution function in PL SQL

I’ve a doubt regarding replacing / substituting values in PLSQL. I’ve used listagg to segregate n number of values with each and every value being splitted by comma delimiter. For instance when executing the above query it returns 7digit alpha numeric values. For example ABCD123,EFGH456,IJKL789 Af…

Regexp_replace to replace specific value

I have data in a column at different position which i want to replace using regexp_replace(). Column value : Business solution, management services, credit Management services, business solution, credit I want to replace business solution with business solutions in a column nothing else I want to change.. Ple…