Special Character should not get loaded into the Staging tab

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
John Daniel
Participant
Posts: 42
Joined: Mon Oct 15, 2007 10:35 pm
Location: Charlotte
Contact:

Special Character should not get loaded into the Staging tab

Post by John Daniel »

ETL designed to move the source data to staging table,
Here source is Oracle table and Staging is also a Oracle table In the source data one of the column's data is comming like this.....

APRN
MS, D.Ph
NP#12391
MS, RD, LD, CDE
AO3143
phd
g
\\\\\\\\\\
RN/CDE
nhnnn b v
CPHT
RN,BSN,CDE
`
FACP,FRCP-C,FACE
Ph.D.
MD/CDE
MD, DrPH

These special character should not get loaded into the Staging table.....

How can I modify the ETL not to load these special characters into the staging table.

Please advise me in this..... Thanks .....
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The CONVERT() function can be used to remove characters from a string. It is not clear which characters you consider to be "special", but the function CONVERT('\#`','',In.OracleStringColumn) would strip out all "\", "`" and "#" characters from the "OracleStringColumn".
John Daniel
Participant
Posts: 42
Joined: Mon Oct 15, 2007 10:35 pm
Location: Charlotte
Contact:

Post by John Daniel »

This modifcation should be eleminate all the special characters.........That how ETL should be..

Please help me in this.....

Thanks ...a lot......

John
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Provide the entire list of special characters in the CONVERT function.

CONVERT('list all special characters here','',In.OracleStringColumn)
Kandy
_________________
Try and Try again…You will succeed atlast!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's nothing "special" about any of those characters, that is why people are asking you to clarify - be specific - about what you mean by special, what exact list of characters you want to remove.

Regardless, Convert() is the resolution, not any kind of a 'workaround'. If you still need help with this, let us know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

One technique that gets mentioned here uses a pair of converts, like so:

Code: Select all

Convert(Convert('ABCDEFGHIJKLMNOPQRSTUVWXZY0123456789','',YourField),'',YourField)
This would remove everything except numbers and upper-case letters. If you have the need, you could add the lower-case alphabet to the mix as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
John Daniel
Participant
Posts: 42
Joined: Mon Oct 15, 2007 10:35 pm
Location: Charlotte
Contact:

Special Character should not get loaded into the Staging tab

Post by John Daniel »

Thanks for your kind reply ...............the above given example will workout as I hope .......let me try this....

I mean Only Alpha and Numerics should get loaded in the staging table...........

Thanks,

John
hailun
Participant
Posts: 40
Joined: Fri Nov 07, 2008 9:07 am

Post by hailun »

chulett wrote:One technique that gets mentioned here uses a pair of converts, like so:

Code: Select all

Convert(Convert('ABCDEFGHIJKLMNOPQRSTUVWXZY0123456789','',YourField),'',YourField)
This would remove everything except numbers and upper-case letters. If you have the need, you could add the lower-case alphabet to the mix as well.
。。。。。。。。。。。。。。。。。。。


It's Cool, thanks
Let's Progress Together....
Post Reply