Skip to content

Tag: plsql

Work Around for PL/SQL to do column validation

I need to create a procedure to validate number of digits between 2 columns. I have some reason that this handling won’t do in Java so it needs to be a stored procedure. It first will get the template(result_format) from one of my table and itself contain data like then the argument P_RESULT will have i…

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…

Transform table to smoothen records in one column

the situation (a real life situation) is: I have a table with “log” records, for simplicity let’s assume there are only columns NAME, TIME, STATE (in reality there are few more). There are cca 1 Milion rows in which there are 100 Names (computers) and cca 10 states (productive, idle, automat…

Shapiro-Wilk test

In PL/SQL, I want to calculate the Shapiro-Wilk value of my selected data. Apparently, the function DBMS_STAT_FUNCS.normal_dist_fit is able to do it, but it takes a table name as a parameter, and not the result of a select. The values I am working with are numbers, selected after many inner joins. Here is a s…