dbTalk Databases Forums  

Data Transformation Question

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


Discuss Data Transformation Question in the microsoft.public.sqlserver.dts forum.



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

Default Data Transformation Question - 08-13-2004 , 03:24 PM






I am very new to DTS (as of today). I am able to pull the data that I want
based on my criteria. What I need to do though is to "Transform" the data
that is being pulled. I am able to do the simple things, like dates and
trims, etc. What I am not able to do is the more complex tasks.

Here's what I need to accomplish:

1. Replace hyphens with underscores
2. Split Account into two columns
a. First 9 chars = Entity
b. Last 5 chars = Account
3. Add columns and populate the column with an entry.
a. Category = Actual
b. DataSrc = XYZ
c. HR = NoPayrollID
e. IntCo = Non_InterCo
4. If the ProjectId field is null, enter the value NoProjectID

I have pretty strong background in VB coding. I go to the ActiveX Transform
option and it looks familiar, but I am just not familiar enough with the
syntax.

My original plan was to put the data into a txt file (that's what I'm doing
now) and then modify what I need using VB, but I would like to avoid that if
possible.

TIA
RC-






Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Data Transformation Question - 08-14-2004 , 04:08 AM






You have a number of options here and it depends on with which you are most
comfortable
Most SQL syntaxes have ways of doing what you want without reverting to
ActiveX transform as it will then be a Row*Row operation

SQL Server for Example

1. REPLACE()
2. SUBSTRING()
3. Not sure what you want here but you could enter a named expression
4. ISNULL()



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"RC-" <r_candee (AT) hotmail (DOT) com> wrote

Quote:
I am very new to DTS (as of today). I am able to pull the data that I
want
based on my criteria. What I need to do though is to "Transform" the data
that is being pulled. I am able to do the simple things, like dates and
trims, etc. What I am not able to do is the more complex tasks.

Here's what I need to accomplish:

1. Replace hyphens with underscores
2. Split Account into two columns
a. First 9 chars = Entity
b. Last 5 chars = Account
3. Add columns and populate the column with an entry.
a. Category = Actual
b. DataSrc = XYZ
c. HR = NoPayrollID
e. IntCo = Non_InterCo
4. If the ProjectId field is null, enter the value NoProjectID

I have pretty strong background in VB coding. I go to the ActiveX
Transform
option and it looks familiar, but I am just not familiar enough with the
syntax.

My original plan was to put the data into a txt file (that's what I'm
doing
now) and then modify what I need using VB, but I would like to avoid that
if
possible.

TIA
RC-








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.