Up Prev Next
From: David J Iannucci <dji at myriad dot com>
Subject: getting output of sp_helptext
Date: Mar 23 2002 2:25AM
I'm struggling with a frustrating problem now. I'd like
to get the source text of a whole slew of stored procs out of
our database so that I can compare (diff) them en masse with
what we've got in CVS.
I note that sp_helptext returns the text of the procedure in
chunks, with newlines artificially attached to each chunk. I
wrote a Perl script to collect these chunks from the output
of sp_helptext, "chomp" them, and re-concatenate them together.
The result, you'd think, would be identical to what had been
put into the database originally. Apparently not. In the
process of storing the source text, Sybase must be truncating
trailing whitespace, or something, from chunks, because after
I concatenate, I get words smooshed together with no whitespace
in between, viz. "where id = 10" becomes "whereid = 10".
Is this a well-known problem? Am I missing something obvious?
If not, is there any way to get back OUT of Sybase exactly the
same source text that was put IN? I'm using DBlib, if it makes
Thanks for your time,
Myriad Genetics, Inc.
Salt Lake City, UT