Skip to content
Advertisement

Tag: sql-update

Python Script to run SQL query UPDATE statement to loop through each row in result set and update columns

Newby working on my first project. Sorry for this explanation. I have 2 x tables: t1: master table with single rows (unique project-id) and 3 status fields, s1,s2,s3 t2: list table with repeating project_id’s with 3 status fields s1,s2,s3 (and other data not relevant here). The value in the s1-3 fields is either true(1) or false(0) table1: project_id, status1, status2,

Update and renew data based on data in other tables

There are 3 tables student, course, and takes as following tot_cred column data in the student table now is assigned with random values (not correct), I want to perform the query that updates and renews those data based on the course’s grade each student has taken. For those students who received F grade will be excluded and those who didn’t

When I update the same row in a table in SQL more than once, it gives an ORA-00001: unique constraint error

I am trying to update a row in a table in SQL back to back and am getting an error when running the second update statement. I’m getting an error in the second update statement. ORA-00001: unique constraint (ADMIN.JHIST_EMP_ID_ST_DATE_PK) violated ORA-06512: at “ADMIN.ADD_JOB_HISTORY”, line 10 ORA-06512: at “ADMIN.UPDATE_JOB_HISTORY”, line 2 ORA-04088: error during execution of trigger ‘ADMIN.UPDATE_JOB_HISTORY’ I was expecting

Advertisement