Having an alias for a table in an UPDATE statement is not ANSI conform and you also don't need it here. Please use also a better alias for the table in the sub-select like "s" or something like this.