How can I test all the columns in a table for tab, linefeed or carriage return

I have a dts pkg that uploads data from SQL Server to Oracle. However I get the following error log for the package:

DATA TRANSFORMATION SERVICES: Data Pump Exception Log


Package Name: U_Unload_for_Oracle_Rpts
Package Description: DTS package description
Package ID: {9A3F8C1E-F7D7-4584-B322-CE0499A58520}
Package Version: {8EA623B9-7BEA-4A8E-9602-B7BB3932BFD4}
Step Name: DTSStep_DTSDataPumpTask_2
Execution Started: 09/06/2006 11:44:42 PM
Error at Destination for Row number 93045. Errors encountered so far in this task: 1.  

Error Source: OraOLEDB
Error Description:ROW-00060: Internal error: [dainsert,16]
Error Help File:
Error Help Context ID:0
  8339035|1|Rc|LN|05/31/2005|05/31/2005|07/01/2005|||DALLAS|||UNKNOWN|DS|HA|6|6|3|0|0|3|0|0|0|0|0|0|0|0|0|0|0|0|90/70|250|10|||90/70|250|10|||0|500|500|3|0|0|3||||0|0.892595884591237|0.892595884591237|0|||||||0|||||0|0||||5000|5000||99|624|6.3030303030303|1.5116969|||2|DC Only|||11|24|12|22|1.6667|0.6667||6|L1|05/31/2005 2:51:00 PM|L1|05/31/2005 2:59:00 PM||||2|Y|TX|85|CN|3|DS|0.907|TX      |6.3|0|0|0|02/14/2005|1.5117||0|0|0|0|0|0||Default|Default|10000|10000|0|0|1|0|||||||||||||||||||||||1.5117|||||||||||||||||||,8339035|1|Rc|LN|05/31/2005|05/31/2005|07/01/2005|||DS|||UNKNOWN|DS|HA|6|6|3|0|0|3|0|0|0|0|0|0|0|0|0|0|0|0|90/70|250|10|||90/70|250|10|||0|500|500|3|0|0|3||||0|0.892595884591237|0.892595884591237|0|||||||0|||||0|0||||5000|5000||99|624|6.3030303030303|1.5116969|||2|Dc Only|||11|24|12|22|1.6667|0.6667||6|LJJ5131|05/31/2005 2:51:00 PM|L1|05/31/2005 2:59:00 PM||||2|Y|TX|85|CN|3|DS|0.907|TX      |6.3|0|0|0|02/14/2005|1.5117||0|0|0|0|0|0||Default|Default|10000|10000|0|0|1|0|||||||||||||||||||||||1.5117|||||||||||||||||||,
Execution Completed: 09/06/2006 11:56:36 PM

****************************************************************************************************

Execution Started: 09/07/2006 12:13:05 AM
Error at Destination for Row number 93353. Errors encountered so far in this task: 1.  

Error Source: OraOLEDB
Error Description:ROW-00060: Internal error: [dainsert,16]
Error Help File:
Error Help Context ID:0
  8342164,2,GG,DI,12/19/2005,12/19/2005,02/01/2006,,,PX,,,HT,AA,HA,50,57,26,5,8,11,205.3,656.93,410.58,431.12,26,5,8,11,205.5,657.6,390.44,452.1,80/60,1000,20,,,80/50,1000,20,,,0,2000,2000,26,5,8,11,,,,16727.62,0.776273562106825,0.756768872618678,16307.320958654,,,,,,,1,,,,,16649.41,16649.41,,,,1500,2000,,744,0,0,0.8227,,,3,Po,633178,1036181,11,24,12,22,1,0,,50,D4,12/19/2005 11:20:00 AM,M6,02/02/2006 4:27:00 PM,M6,02/02/2006 4:27:00 PM,,2,N,AZ,13,MA,1,PX,0.8227,AD ,0,1.02097763588595,0.8227,16649.41,02/14/2005,4.2178,,1,1,0.8227,0,0,1,P1,Default,Default,3000,4000,0,1,1,0,,,,,,,,,,,,,,,,,,,,,,,0.8227,,,,,,,,,,,,,,,,,,,
8342164,2,GG,DI,12/19/2005,12/19/2005,02/01/2006,,,PX,,,HT,AA,HA,50,57,26,5,8,11,205.3,656.93,410.58,431.12,26,5,8,11,205.5,657.6,390.44,452.1,80/60,1000,20,,,80/50,1000,20,,,0,2000,2000,26,5,8,11,,,,16727.62,0.776273562106825,0.756768872618678,16307.320958654,,,,,,,1,,,,,16649.41,16649.41,,,,1500,2000,,744,0,0,0.8227,,,3,Po,633178,1036181,11,24,12,22,1,0,,50,D4,12/19/2005 11:20:00 AM,M6,02/02/2006 4:27:00 PM,M6,02/02/2006 4:27:00 PM,,2,N,AZ,13,MA,1,PX,0.8227,AD ,0,1.02097763588595,0.8227,16649.41,02/14/2005,4.2178,,1,1,0.8227,0,0,1,P1,Default,Default,3000,4000,0,1,1,0,,,,,,,,,,,,,,,,,,,,,,,0.8227,,,,,,,,,,,,,,,,,,,

Execution Completed: 09/07/2006 12:26:35 AM

****************************************************************************************************

I believe it is a tab, linefeed or a carriage return. How can I test the data in the table for these characters. In addition, it could be another character.

examples and documentation are needed.

Thank you,
Sami
tf842Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LowfatspreadCommented:
then generate some select statements to perform the test for you!

e.g.

Select
  case ordinal_position   when minord then 'Select * from [' + table_schema +'].[' +Table_name+'] Where '
         else '     or ' end
 +case when data_type like '%char%' then ''
     else 'patindex(''%''+Searchchar+''%'',' end
 +'['+column_name+']'
 +case when data_type like '%char%' then ' like ''%'' + SearchChar + ''%''
             else ')> 0 ' end
from Information_schema.columns as c
 inner join (select table_schema,table_name,min(ordinal_position) as minord from information_schema.columns  
                 Where Data_type like '%char%'
                     or Data_type like '%Text%'
                  group by table_schema,table_name) as M
  on c.table_schema=m.table_schema
 and c.table_name=m.table_name
 Where Data_type like '%char%'
       or Data_type like '%Text%'
 order by table_schema,table_name,ordinal_position



LowfatspreadCommented:
sorry ...

Select
  case ordinal_position   when minord then 'Select * from [' + table_schema +'].[' +Table_name+'] Where '
         else '     or ' end
 +case when data_type like '%char%' then ''
     else 'patindex(''%''+Searchchar+''%'',' end
 +'['+column_name+']'
 +case when data_type like '%char%' then ' like ''%'' + SearchChar + ''%''
             else ')> 0 ' end
from Information_schema.columns as c
 inner join (select table_schema,table_name,min(ordinal_position) as minord from information_schema.columns  
                 Where Data_type like '%char%'
                     or Data_type like '%Text%'
                  group by table_schema,table_name) as M
  on c.table_schema=m.table_schema
 and c.table_name=m.table_name
 cross join (select char(9) as SearchChar    -- Tab
                  union select char(10)    --CR
                  union select char(13)    --LF
                ) as x  
 Where Data_type like '%char%'
       or Data_type like '%Text%'
 order by table_schema,table_name,ordinal_position


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.