Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 String transformation...?

Author  Topic 

Ravi0435
Starting Member

47 Posts

Posted - 2007-05-18 : 13:07:36
Hi,
I need to extract a table from someother database in which one of the city columns with datatype CHAR has city values but all the values are appended by dots at the end...like:
"Newyork.............."
"Boston..............."
"Chicago.............."
"Los Angeles..........."

After extracting the table/data , i will have to do some transformations and lookups on the table....and at the same time i will have to remove the dots and load the table/data in to another SQL Server Database, i dont think i can use the substring as each record's length is different.

Can someone suggest me how to do this one...?

thanks
Ravi

Nothing much that i can do..!!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-18 : 13:11:33
select replace(YourColumnName, '.', '')
from...

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Ravi0435
Starting Member

47 Posts

Posted - 2007-05-20 : 11:30:50
Thanks for the help..!!

thanks,
ravi

Nothing much that i can do..!!
Go to Top of Page
   

- Advertisement -