Your post is pretty hard to understand. I think you're trying build some sort of dynamic SQL query that creates stored procedures...? Hmm... It seems like you want to be able to modify 'testProc_hist' after it's been created?
My suggestions is to use a template engine like HTML::Template to create your stored procedure template. When you need to change a stored procedure, find replace TOKEN values in the template (e.g. $SELECT_CLASE, $WHERE_CLAUSE, etc.) and then execute it as an 'ALTER PROCEDURE' statement.
The idea of 'parsing SQL in Sybase stored procedure' is WAY WAY to complicated - instead do your processing outside of the stored procedure and then execute an ALTER PROCEDURE statement instead.
Good luck?
Kurt
In reply to Re: Parse SQL in Stored Procedures
by whereiskurt
in thread Parse SQL in Stored Procedures
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |