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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

Starting Member

3 Posts

Posted - 10/03/2013 :  03:33:03  Show Profile  Reply with Quote
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.

Flowing Fount of Yak Knowledge

United Kingdom
3385 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  
 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.02 seconds. Powered By: Snitz Forums 2000