• Problem with the script in that if any of your variables are null you don't get the create string produced. i.e., in my experimentation @FileGroupName was null on one of my tables so the Drop index is created but the Create Index is not produced.