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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid a record with an error in Stored Procedure?

Status
Not open for further replies.

Katya85S

Programmer
Jul 19, 2004
190
I need an advice. It could be a simple question, I just not familiar much with complex stored procedures:
SQL stored procedure implements SELECT statement for asp project (selected recordset’s fields are displayed in asp form). Some records might be (and I already found a couple of them) too long to be accepted by SQL Server. The Stored Procedure stops running asp page with an error message:
Could not insert a row larger than the page size into a hash table. Resubmit the query with the ROBUST PLAN hint.
Resubmitting the query with the Robust Plan doesn’t help.
I hope it is possible to avoid such record in store procedure as for example: do SELECT statement while an @@Error = 0 and do some other, simplified SELECT statement for rows where @@Error<>0. Except, I don’t know how to perform it.
I would appreciate any advice greatly. Thank you all in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top