Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

blank spaces is inserted when i insert values to columns

Status
Not open for further replies.

bereza

Technical User
Jun 14, 2006
105
EU
Hi everybody

I am using SQL Server 2005, it is first time, before it was just sql 2000.



I have created a little table that contains columns which are nvarchar(50). when I insert into the table (by opening it and write by hand or by using sp), if my string is less than 50 charactars it inserts blank spaces in the end of the string.



Why and how can i have strings without blank spaces.



thanks
 
It shouldn't do that with an nvarchar field. Are you sure it isn't nchar which would do that?

Please post the code you use to insert data if that doesn't turn out to be the problem.

"NOTHING is more important in a database than integrity." ESquared
 
thanks,

yes thay are nvarchar and i use following in a sp to insert values.

insert into MyTable Values('GroupName', 'UserName', 'EMail', 'FullName')

thank again
 
if my string is less than 50 charactars it inserts blank spaces in the end of the string.
How are viewing the data that shows the spaces?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top