On the move:

I'm currently moving the following to their own blogs: Unix, HTML for Blogs, Perl & Java.
The links are on the left side.

Saturday, December 20, 2008

Generating Column Formatting for SQL+



This code sets up column formatting for every column in User_Tab_Columns. The column names are stacked, breaking on the underscore. Since alpha titles aren't displayed in full if not enough space is allocated, a decision is made as to whether a column part name or if the data field is longer.

As a place to start, it sets up any field longer than 30 characters to A30, but adds 'Word_wrap.' Any number field longer than 10 characters it drops down to 10.

I'm assuming some fine tuning will need to be done, and sometimes, a report will need to change what this file has, but it can save a lot of time if this is set up initially.

The code is long enough that I've stored it as an attachment on my site (UCols.SQL).

No comments:

Post a Comment