Timeline for Oracle 10 UPDATE query
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 9, 2013 at 10:07 | history | edited | ypercubeᵀᴹ | CC BY-SA 3.0 |
deleted 500 characters in body
|
Feb 9, 2013 at 10:00 | history | edited | ypercubeᵀᴹ | CC BY-SA 3.0 |
deleted 500 characters in body
|
Feb 9, 2013 at 9:57 | comment | added | Mat |
... but that can also be resolved with order by ... desc nulls last without a having clause. Nicer.
|
|
Feb 9, 2013 at 9:53 | comment | added | Mat |
I hope it does because that's essentially what I was working on :-) The not null test outside doesn't really work with the desc ordering: the nulls will be first (and ranked). Does appear to work in a test here by moving the not null check to a having clause inside the nested query.
|
|
Feb 9, 2013 at 9:46 | comment | added | ypercubeᵀᴹ | @Mat: Can you check this version of the 2nd query, would it work now? | |
Feb 9, 2013 at 9:45 | history | edited | ypercubeᵀᴹ | CC BY-SA 3.0 |
deleted 121 characters in body
|
Feb 9, 2013 at 9:24 | comment | added | ypercubeᵀᴹ |
@Mat: I rarely use Oracle and I avoid ROWNUM so you may be correct. That's why I added the ROW_NUMBER() way.
|
|
Feb 9, 2013 at 9:19 | comment | added | Mat |
I don't think your first two versions can return any rows because of the rownum = 2 thing. Am I missing something because of nesting? (Last one does look good though, better than what I hinted at.)
|
|
Feb 9, 2013 at 9:16 | history | edited | ypercubeᵀᴹ | CC BY-SA 3.0 |
added 658 characters in body
|
Feb 9, 2013 at 9:08 | history | answered | ypercubeᵀᴹ | CC BY-SA 3.0 |