I am having a major issue with the update using a spreadsheet. What I have discovered when I change data in the last_name columns to a new last name it updates just fine. But there are some last names I dont change and when I leave them blank on the spreadsheet and upload the spreadsheet into...
Sorry to get back to you guys. I have been working on this and finally figured it out but I see once again you guys came through. Chris the above statement you provided for the insert is what I have found also. But what I failed to mention is I am doing a joins statement because I have 3 tables...
I have another issue. I have to take the data from my EMP_TEMP and insert that data into another table but that table has three extra columns: Middle_name, Birth_date, Email. I am not sure on how to create an INSERT statement to populate that table. So I am UPDATING THE EMP TABLE FROM THE...
Thanks guys for the extra info I really appreciate but I do have another question, What if i wanted to update multiple columns using the MERGE statement. For instance I want to update last_name column and phone_number? Would I just add another SET clause in with it?
Ok guys I got it figured out. I found a query on the internet and so I just plugged in what I am trying to do:
UPDATE EMP
SET LAST_NAME =
(SELECT LAST_NAME FROM EMP_TEMP
WHERE EMP.ID = EMP_TEMP.ID)
WHERE EXISTS
(SELECT LAST_NAME FROM EMP_TEMP
WHERE EMP.ID = EMP_TEMP.ID);
I had updated 4...
ok guys this is what I got:
UPDATE EMP
SET LAST_NAME =
(SELECT LAST_NAME FROM EMP_TEMP
WHERE EMP.ID = EMP_TEMP.ID);
It works but it doesnt work. What happened was it updated all 1000 last names to the new last names from EMP_TEMP. SO then I did this:
UPDATE EMP
SET LAST_NAME =
(SELECT...
I am sorry about that. I havent come up with anything. Still researching. Some of the examaples I have seen I am still scratching my head on. Its not all that clear.
I would like to know how do you update over 1000 rows in the EMP table from the creating a temp table from the EMP table where you are updating the column name Last_name? Lets say that there are 4000 rows in the EMP table. I create a temp table from emp and I have a excel spread sheet with 1000...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.