Updating thirdrule SQLQuery