0

I am using Sybase DB and facing some issues with some tables because of special characters..

I found special characters like: ������ �Y1�0�@�D ��� ��� in one of the tables.

How can I search for these and then delete from the table using SQL queries?

Thanks

WinSupp
  • 361
  • 2
  • 6
  • 20
  • 2
    Have you looked at the character set definition for the table and considered changing it to reflect what's actually in the table (looks like just may be a mis-match)? Do you know the character set that the special characters are coming from? What kind of issues are you having? – ToddB Jun 06 '14 at 14:18
  • Sybase was a company, not a database. Which Sybase product are you referring to? SQLAnywhere? ASE? – Mike Gardner Jun 06 '14 at 14:18
  • I am trying to Migrate the DB from SQLAnywhere to another DB.. Unloading the data from SQLAnywhere to text files and then loading the data to the new DB... But because of these special characters, the migration on these tables (with special chars) is failing.. – WinSupp Jun 06 '14 at 14:25
  • Failing how? Error message? – ToddB Jun 06 '14 at 14:35
  • Migrating the DB over to PostgreSQL. The new DB tries to load (Copy) text files into the appropriate table. When it tries to load the text file with the special character, it gives an error stating that the file can not be loaded... **.PSQLException: ERROR: extra data after last expected column Where: COPY message_log** – WinSupp Jun 06 '14 at 14:39
  • Just wanted to know if there is any way that I can search for these special characters using a sql query? – WinSupp Jun 06 '14 at 14:42
  • If you can define the set of 'special characters' and you are using text files then I would use the unix command line to strip the defined set of characters from the text file (e.g. http://www.unix.com/shell-programming-and-scripting/175908-help-replace-special-characters.html). Obviously, stripping these characters means you are losing data. – ToddB Jun 06 '14 at 15:15

0 Answers0