http://sqlfiddle.com/#!9/b98ea/1 (Sample Table)
I have a table with the following fields:
- transfer_id
- src_path
- DH_USER_ID
- status_state
- ip_address
src_path field contains a couple of duplicates filename values but a different folder name at the beginning of the string.
Example:
- 191915/NequeVestibulumEget.mp3
- /191918/NequeVestibulumEget.mp3
- 191920/NequeVestibulumEget.mp3
I am trying to do the following:
- Set status_state field to 'canceled' for all the duplicate filenames within (src_path) field except for one.
I want the results to look like this: http://sqlfiddle.com/#!9/5e65f/2
*I apologize in advance for being a complete noob, but I am taking SQL at college and I need help.