![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. You will update 0 rows which isn't an error. |
#3
| |||
| |||
|
|
So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. You will update 0 rows which isn't an error. |
#4
| |||
| |||
|
|
So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. You will update 0 rows which isn't an error. |
#5
| |||
| |||
|
|
So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. You will update 0 rows which isn't an error. |
#6
| |||
| |||
|
|
m... (AT) pixar (DOT) com> wrote in message news:JlUMk.3915$D32.1708 (AT) flpi146 (DOT) ffdc.sbc.com... So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. *You will update 0 rows which isn't an error. #3 is terrible. *You are generating a lot more redo etc. than you need to. Just use the merge statement. *I don't see what dual has to do with it.*You should be able to do it in one statement. Jim- Hide quoted text - - Show quoted text - |
#7
| |||
| |||
|
|
m... (AT) pixar (DOT) com> wrote in message news:JlUMk.3915$D32.1708 (AT) flpi146 (DOT) ffdc.sbc.com... So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. *You will update 0 rows which isn't an error. #3 is terrible. *You are generating a lot more redo etc. than you need to. Just use the merge statement. *I don't see what dual has to do with it.*You should be able to do it in one statement. Jim- Hide quoted text - - Show quoted text - |
#8
| |||
| |||
|
|
m... (AT) pixar (DOT) com> wrote in message news:JlUMk.3915$D32.1708 (AT) flpi146 (DOT) ffdc.sbc.com... So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. *You will update 0 rows which isn't an error. #3 is terrible. *You are generating a lot more redo etc. than you need to. Just use the merge statement. *I don't see what dual has to do with it.*You should be able to do it in one statement. Jim- Hide quoted text - - Show quoted text - |
#9
| |||
| |||
|
|
m... (AT) pixar (DOT) com> wrote in message news:JlUMk.3915$D32.1708 (AT) flpi146 (DOT) ffdc.sbc.com... So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark -- Mark Harrison Pixar Animation Studios #2 won't work. *You will update 0 rows which isn't an error. #3 is terrible. *You are generating a lot more redo etc. than you need to. Just use the merge statement. *I don't see what dual has to do with it.*You should be able to do it in one statement. Jim- Hide quoted text - - Show quoted text - |
#10
| |||
| |||
|
|
So far, I've figured out 4 possible ways to perform upsert-like functionality: 1. try insert, on exception update 2. try update, on exception insert 3. delete, then insert 4. merge with DUAL It seems so far the nicest solution is #4. Here's some questions: - Do the other methods have any features which might recommend them? - Are there any methods that might be portable to other databases? - Are there any methods I might be overlooking? Many TIA! Mark Search asktom.oracle.com for "upsert" - he has documented, timed |
![]() |
| Thread Tools | |
| Display Modes | |
| |