• But the command you are executing is ALTER INDEX,

    So it will print out ALTER INDEX indexname ON tablename .....

    So you can debug what you have told SQL to build and execute, so you will need to find all occurances of - in the output and you know where your problem then lies.