Updating secondrule SQLQuery