Skip to content

Tag: oracle

Not enough values selecting into a table value

Here is the code: and the following function doesn’t compile: It says: PL/SQL: ORA-00947: not enough values Why is that? Answer Why is that? You are trying to put 3 values (and multiple rows) into a single variable. Use BULK COLLECT INTO and wrap the values in the object type: Given the sample data: The…

Find value that is not a number or a predefined string

I have to test a column of a sql table for invalid values and for NULL. Valid values are: Any number and the string ‘n.v.’ (with and without the dots and in every possible combination as listed in my sql command) So far, I’ve tried this: The regular expression also matches the single charact…

Query monitoring changes in the field

I need to program a query where I can see the changes that certain fields have undergone in a certain date period. Example: From the CAM_CONCEN table bring those records where the ACCOUNT_NUMBER undergoes a modification in the CONCTACT field in a period of 6 months before the date. I would be grateful if you …

Oracle Apex conditional icons on values in classic report

I have a follow up question based on this answer which is string based: https://stackoverflow.com/a/41556608/221270 How to achieve the same conditional color and icon formatting but based on a value: If I use the code above I got this error: ORA-20999: Failed to parse SQL query! ORA-06550: line 10, column 1: …

How to increase performance when inserting more than 40k+ rows

My attempt: Currently, I am inserting a few records and it is giving exact results but in actuality, there are 40k+ records so I believe it will give performance issues also. Is there any way to insert the records faster because I will write a procedure for this insertion? Is there any other in which I can wr…

Adding time to a table in SQLplus without date

I am trying to create a table regarding telecommunication and I want to add time for 2 rows call_start_time and call_end_time and with that, I want to calculate the call_duration. This is what I used to enter the value If I use this format while displaying the data only the date is displayed not the time. Can…