Skip to content
Advertisement

Tag: plsql

Getting a not valid month and need to insert records in incremental manner

The problem which I am facing: I need to convert timestamp to date and then insert it into the deligate_details_trans for the completed_date column of the deligate_details_main table. When I am converting it is giving ORA-01843: not a valid month error. Currently, deligate_details_main has 3 rows that are going to be inserted into the deligate_details_trans table but if any rows

Output records with null values even if not present

I have a table as below in Oracle gen_id serial_code is_verified 1 fmcg Y 1 smcg Y 1 xmcg N 2 smcg Y 2 fmcg Y 2 2mcg Y 3 smcg Y 3 amcg Y Now I want the output for max gen_id which is 3 in this case and serial_code ‘smcg’ and ‘fmcg’ I can get the output easily

PL/SQL CREATE PROCEDURE – Salary increase based on tenure

I have worked on this for a while but the code did not work and I could not figure out the correct solution. Did I miss something from the code? Thank you. — Question – The company wants to calculate the employees’ annual salary: –The first year of employment, the amount of salary is the base salary which is $10,000.

remove extra “WWW_” using sql SUBSTRING [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question In the Name_code column, we have these types of I want O/P the value like this SUBSTR(Name_code,4, length(Name_Code)-3) i tried this but no result How

i am trying to combine the PL/SQL and the SQL commands in manipulating the database. am i doing it correctly? any help and corrections?

enter image description hereuse PL/SQL with SQL commands in manipulating the database (PL/SQL structure, Data types, Variable, DBMS Output and Conditions) and this is my codes and what i have understandenter image description here Answer The sample code for me does not run. It gives The reason is that you have 4 columns in your statement but only 3 values

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 write an insert

Checking the Oracle SQL DECODE function result against 0

I’m looking at some old PL/SQL code and I have dozen of DECODE functions written like this: DECODE(value_1, value_2, 1, 0) = 0 Now, I know these DECODEs make comparison between value_1 and value_2 and they return true or false based on the outcome of comparison. But, for the love of coding, could someone please tell me what’s the logic

Advertisement