OK, but if the second argument = 0, it will fail again!!!
I think the last update is the best. Turn the args in the select statement. 0 will be converted tot "0".