Avatar of tf842
tf842
 asked on

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
Microsoft SQL Server

Avatar of undefined
Last Comment
Lowfatspread

8/22/2022 - Mon
Lowfatspread

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



ASKER CERTIFIED SOLUTION
Lowfatspread

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.
fblack61