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.

Wednesday, December 24, 2008

Column Information

I use this code for investigating fields in the database.

It switches to the system user when you provide the password. (It stores the old user so it can be restored at the end.)

All the information for that column is read from DBA_Tab_Columns and written in HTML format. Firefox will load to display the data. (It is assumed that the program can be found at C:\Program Files\Mozilla Firefox1\firefox.)

Code is then generated to display each table where the column is found, a count of that field, the maximum length, and the highest value. As this is not always something I want to run (or maybe just run for a particular set of tables), the generated code is stored in FCnt.Sql, but not executed until a request is made for it.

Because of the length, the actual query is stored here: Fld.Sql.

No comments:

Post a Comment