Skip to content

Tag: oracle

Oracle Optimize Query

i’m working with oracle pl/sql and i have a stored procedure with this query, and it is a bit convoluted, but it gets the job done, the thing is it takes like 35 minutes, and the sql developer Autotrace says that is doing a full scan even though the tables have their indexes. So is there any way to impr…

Extracting text between a character and space

I have this text and I want to extract the id of collector that is bolded knowing that the id is not fixed it May 5 digits or even three digits EX: what is the best approach to do that by oracle functions Answer I think you need REGEXP_SUBSTR as follows:

Query with empty or one row only

I’m using an oracle DB and I need to know if certain value is on myTable (it can be 0-N times), but i’m using a software that does some tasks with each row of the query output, so, my result should be empty when I have no value in myTable (so the software will do nothing) or one row when

Problem in using group by statement in sql

I am not able to group by table which has all the values same but has two rows. I am not understanding what is the reason behind that. After running this query i am getting the table below and i want to group the table along the LOT_No. TABLE : Now when i am trying to Group by LOT_No, i