Skip to Content
Author's profile photo Mark A Parsons

CODE : sp_autoformat : fix utf8 spacing issue, add binary support

Modified version of the sp_autoformat stored proc with the following changes:

1 – removes extra spaces that appear in columns when using the utf8 character set

2 – adds support for (var)binary columns

—– NOTES:

Original code was extracted from a ASE 15.7. SP136 dataserver.

The attached code appears to work fine in ASE 16.0 SP02 PL03.

While I’ve run unit tests on quite a few data types, as well as the iso_1 and utf8 character sets, I cannot guarantee with 100% certainty that this version of sp_autoformat displays *ALL* datatypes correctly … so use at your own discretion.

Keep in mind that SAP may modify future versions of sp_autoformat so (obviously) there are no guarantees the attached version will work properly in future versions of ASE. [“Duh, Mark!” ?]

—–

To uninstall you have a couple options:

a – use ddlgen/defncopy to save a copy of the original sp_autoformat *before* you load the attached

b – you can always extract a copy of the original sp_autoformat proc from the installmaster script

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Pankaj K Pathak
      Pankaj K Pathak

      No attachment file found here Mark 🙁