Using Sybase IQ v12.7. Executing sp_helptext ProcedureName
shows the text of the stored procedure which is fine. However it wraps lines at 80 characters. The question is, how to show text text of a stored procedure without wrapping?
In Sybase Central Java Edition there is a feature see the text of a stored procedure (Tranact-SQL) without line wrapping. So the question could be restated in a different way: how does Sybase Central get the text of a stored procedure without wrapping the text at 80 characters?
Basically looking for a programmatic way to dump out stored procedures for diff-ing and version control.
Thanks to any responses!
You can view the source text of a system procedure by executing sp_helptext when using the sybsystemprocs database. If the source text of a stored procedure was encrypted using sp_hidetext, SAP ASE displays a message advising you that the text is hidden.
A wrapper business object for stored procedure allows you to group multiple stored procedures or execute the same stored procedure multiple times. The business objects corresponding to the stored procedures are added as multi-cardinality children of the wrapper stored procedure.
Expand the Stored Procedures folder, right-click the stored procedure you want to edit, and choose Edit. Edit the stored procedure properties. Change the Name. Select the parameters to be used in the stored procedure.
In Tasks view, double-click the Procedures & Functions folder in the Contents tab, double-click the procedure you want to run, then choose Execute from Interactive SQL from the list of Procedure & Function Design Tasks.
sp_helptext does not do any wrapping - it breaks up the procedure definition text at the newline characters and returns each line as a row. If you want the whole thing returned as a single string, you can select the procedure definition directly from the system table:
select proc_defn from SYS.SYSPROCEDURE where proc_name='<procedurename>'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With