Also on the subject of checksum testing, this query will generate a checksum query for a given table. Use this query to generate the checksum for each table, then customize the sum() clauses if you did any transformations on your data.

select case a.xtype
when 167 then 'SUM(LEN('')) as sum_len_'','
when 175 then 'SUM(LEN('')) as sum_len_'','
when 231 then 'SUM(LEN('')) as sum_len_'','
when 106 then 'SUM('') as sum_'','
when 56 then 'SUM('') as sum_'','
when 104 then 'SUM(CONVERT(int,'')) as sum_'','
when 61 then 'SUM(MONTH('')+DAY('')+YEAR('')) as sum_'',
SUM(LEN(MONTH(''))+LEN(DAY(''))+LEN(YEAR(''))) as sum_len_'',' -- datetime
else' '+convert(varchar,a.xtype)
end col_type
from syscolumns a, sysobjects b
where and b.xtype='U'
and upper( = 'MYTABLE'
order by,, a.colid

Tags: , ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>