![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all. We have a Transform Data Task (TDT) that pulls in data from one source and inserts it into a table with the same #/type of columns in SQL Server 2K. However, one field has extra spaces at start and we'd like to run LTrim() on it. Our TDT is straightforward mapping of the columns from the source to the destination. How would we accomplish the LTrim() without doing a SQL query? Thanks. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
1. Set up your DTS task normally, with default transformation mappings. 2. On the Transformations tab, delete the mapping (it's a "Copy Column" by default) for the column that needs LTRIMming (click on that line and hit the "delete" button). 3. If the two columns involved don't remain highlighted, click on each of them to highlight them, then click the "new" button. 4. This brings up a menu of choices called "Create New Transformation". You should probably pick "Trim String" and click "OK". 5. This brings up your "Transformation Options" for this transformation. Click "Properties" and select the type of trimming you want ("trim leading white space"). 6. OK out of there. You could also do this as an ActivX Script-type transformation but that's a little messier and there's no need for it here. "dw" <cougarmana_NOSPAM (AT) uncw (DOT) edu> wrote in message news:uGfM4kDZEHA.212 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Hello all. We have a Transform Data Task (TDT) that pulls in data from one source and inserts it into a table with the same #/type of columns in SQL Server 2K. However, one field has extra spaces at start and we'd like to run LTrim() on it. Our TDT is straightforward mapping of the columns from the source to the destination. How would we accomplish the LTrim() without doing a SQL query? Thanks. Why don't you want to do the "LTRIM(<colname>) as <colname>" in a source query? |
![]() |
| Thread Tools | |
| Display Modes | |
| |