SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Invisible Charcters in nvarchar Column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shadychima
Starting Member

2 Posts

Posted - 10/03/2013 :  03:33:03  Show Profile  Reply with Quote
Hi,
I have a table with NVARCHAR(20) type column to store phone numbers. I am not able to process the data from this column as the code throws error : 'Input string was not in a correct format.'
When I query the table data, it appears fine. But as I copy paste the column data from SSMS result grid to Query Editor window, it paste -- charcters in addition to data. E.G. Data which appears '0121 4590518 ' in the grid, when I paste it on Query editor window is shown as '0121 4590518-'.
Not sure is there a problem in column data type or the data.
Any help is appreciated.
Thanks in advance.

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3355 Posts

Posted - 10/03/2013 :  04:20:53  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
Have a look at the Unicode data.
Get it into a variable then look at each character in turn.
The applications have to interpret the data for display and probably as something isn't in the standard character set they are mapping it differently.

I have seen errors created by .net applications which have the wrong datatype for columns and it manages to get invalid data into strings - that usually causes an error accessing the data rather than incorrect data though.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000