• Alex,

    Here is the basic code I used. This produces a nice temp table of information and of course, you can edit the query if you don't want all the columns. I am using this in a larger SProc that will allow my user to add the table he wants to compare as a parameter. Works well so far! Obviously, from this basic code, you could tinker it to meet your own needs.

    Create table TempTable

    (TABLE_QUALIFIER varchar(40),

    TABLE_OWNER varchar(20),

    TABLE_NAME varchar(40),

    COLUMN_NAME varchar(40),

    DATA_TYPE int,

    TYPE_NAME varchar(20),

    PREC int, LENGTH int,

    SCALE int, RADIX int,

    NULLABLE char(4),

    REMARKS varchar(128),

    COLUMN_DEF varchar(40),

    SQL_DATA_TYPE int,

    SQL_DATETIME_SUB int,

    CHAR_OCTET_LENGTH int,

    ORDINAL_POSITION int,

    IS_NULLABLE char(4),

    SS_DATA_TYPE int)

    Set nocount on

    Insert TempTable

    Exec sp_columns @table_name = 'YOUR TABLE NAME'

    Select * From TempTable

    Drop table TempTable