Advertisement

05.21.2008 at 05:02PM PDT, ID: 23422895
[x]
Attachment Details

Data transformation trimming space in SQL 2000

Asked by Dawn_Bl in MS SQL Server

Tags: SQL Server 2000

I have a DTS package in SQL Server 2000.

I am migrating a table with a text column from SQL to another database platform (Sybase ASE 12.5.3) using a Transform Data Task.

The text data type is not supported in the Transform Data Task, so I am breaking up the data using the substring function (i.e. substring(myTextColumn, 1, 1500) in the query for Source and sending to a char(1500) destination, thus eliminating the issue with text. I then piece back together at the destination using an Execute SQL Task to the destination table with the receiving text column.

The problem occurs when there are spaces at the cut and paste point (i.e. at position 1500). The transformation is trimming the trailing spaces. How can I ensure that all 1500 chars are transformed to the destination, regardless of whether there are spaces at the end?

Thanks,
Dawn
Start Free Trial
 
 
Loading Advertisement...
 
[+][-]05.21.2008 at 06:17PM PDT, ID: 21620236

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: SQL Server 2000
Sign Up Now!
Solution Provided By: frankytee
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.22.2008 at 05:47AM PDT, ID: 21623254

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 10:14AM PDT, ID: 21625725

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 10:16AM PDT, ID: 21625744

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 11:41PM PDT, ID: 21629837

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628