Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Bad data import Expand / Collapse
Author
Message
Posted Friday, April 30, 2010 3:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:11 PM
Points: 7,920, Visits: 9,646
stewartc-708166 (4/30/2010)
[quote]
In SSIS, an example of how to identify and correct would be:
CODEPOINT(ColumnName) < MinCodePageValue || CODEPOINT(ColumnName) >MaxCodePageValue ? (DT_WSTR,26)NULL(DT_WSTR,26): (DT_WSTR,26)ColumnName

a T-SQL equivalent would be:
SELECT CASE 
WHEN ASCII(ColumnName) < MinCodePageValue OR ASCII(ColumnName) > MaxCodePageValue THEN NULL
ELSE ColumnName
END AS ColumnName
.
.
.


Rather than use NULL here, mightn't it be better to find out what replacement character the mainframe app would have used if required to display this data and use that character?

very good question and discussion. Lots for me to learn from it.


Tom
Post #913541
Posted Friday, April 30, 2010 11:02 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, February 4, 2011 7:20 AM
Points: 977, Visits: 1,499
Very interesting.

Thanks!


Tom Garth
Vertical Solutions

"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
Post #913916
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse