Obviously there's nothing wrong with the SQL itself, so the error must be generated from the package you're trying to run it in. Can we see more? Especailly since you say: