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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Data export - how to strip out the special charact

Author  Topic 

geoffgarcia
Starting Member

3 Posts

Posted - 2005-11-10 : 09:57:47
Hey everyone!
I'm doing an export from SQL into excel spreadsheet and then am going to clean out certain parts of the data with global search/replace. The problem is that the SQL data is full of special characters such as |'s and the little box looking characters.
How do I export without these characters?
I know its possible, I did it about 2 years ago and remember I did some crazy file conversion (make wk3 or something) but I no longer remember
Any help would be much appreciated!
Thanks,
Geoff

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-10 : 10:02:09
One of the possible ways is to replace those characters by ''

Select Replace(col,'|','') from yourTable

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

geoffgarcia
Starting Member

3 Posts

Posted - 2005-11-10 : 10:06:07
The problem is the special characters don't "appear" in SQL. Obviously they are there in some way. Also, I can't change the data in SQL, its our production machine.
I can't do a global search/replace in Excel because it doesn't recognize the | or other characters.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-11 : 00:37:14
Replace will not change the data in the table. It will just display the records without those characters

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

geoffgarcia
Starting Member

3 Posts

Posted - 2005-11-14 : 09:23:57
I might only have caught one or two of the special characters, is there any way to wipe it clean of all the weird things? I'm speaking of carriage returns, tabs, and stuff of that nature.
Geoff
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-14 : 09:39:37
Refer this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56713

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -