Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resume SP if create index failes

Status
Not open for further replies.

tJoe

Programmer
Sep 5, 2008
1
0
0
US
I have an SP that creates an index on a temp table.

create unique clustered index #i_tmp on #test(ID1, ID2)

In the case that we get a duplicate record, I would rather the procedure ignore the create index statement and continue running rather than cause the entire sp to fail.

Is there a way to do this?

 
proc code...
exec ('create index...')
more proc code...

But if uniqueness is not important, why not just create a non unique index?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top