Monday, February 20, 2012

ODBC issue!!!

Im trying to run a very simple script on an index that doesnt exist.

Drop Index BLAH;

Create Index BLAH;

When I run this through an ODBC Connection it fails on the drop since it doesnt exist and STOPS running the script. Im hoping this is a simple setting on my part where if it errors on something as simple as a index to be dropped does not exist then it will continue to the next line in the script

Thanks

Scott

What about first checking in your script if the index you want to drop already exists ?

IF Object_ID('SomeIndexName') IS NOT NULL
DROP INDEX BLAH

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||I can do that butthe amount of modifications that would require would be huge. I was hoping there was an easier way.

No comments:

Post a Comment