-1

I have a stored procedure which contains more that 25 queries and pass the line limit of MySQL stored procedure causing memory exhausted error.

So what I want is to divide it into two stored procedures and create a third stored procedure to union the two procedures. Can anyone help me with this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Robel Alemu
  • 113
  • 7

1 Answers1

-1

Just push the results of both sp calls into a temp table:

/*Create a table with the same columns that the sp returns*/
CREATE TABLE #tempblahblah(blahblahblah NVARCHAR(50))

INSERT #tempblahblah ( blahblahblah )
 EXEC MyStored 0

INSERT #tempblahblah ( blahblahblah )
 EXEC MyStored 1

SELECT * FROM #tempblahblah
Himanshu Patel
  • 213
  • 2
  • 13