dbTalk Databases Forums  

Removing Unwanted Charaters from a String

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Removing Unwanted Charaters from a String in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marcial
 
Posts: n/a

Default Removing Unwanted Charaters from a String - 02-14-2006 , 07:37 PM






Hello DTS-ers

I'm a novice using DTS to Import Data from a text file into a SQL Server
2000 table.

The columns in the text file are delimited with the double-quote characters
and imports succeed fine most of the time.

However, on occassion I encounter records which contain addtional
double-quotes that were apparently entered online by end users. Although
validation on the front end is the best solution I don't have the luxury of
this option.

As an example I receive records like the following: .... , """asdfjkl
lakskd""", ... (Notice the two extra doube-qoutes pairs... the outermost is
added on by DTS!!)

I need a way to parse and remove all double-qoutes at the beginning and end
of a column field. I assume an ActiveX script on the column would work but I
need a concrete approach to the coding.

All suggestions are welcomed.

Thanks~
--
Application Engineer / DBA
UCLA SOM

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.