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 2008 Forums
 Transact-SQL (2008)
 Garbage tail space

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2010-05-14 : 16:54:14
I used SQL 2008 express version.
I found that every time insert a new record as text into a table, it create garbage tail space. For example, if input "book" into a cell from app, it will be stored as "bookxxxxx". "xxxxx" is garbage tail. It make a trouble to retrieve record from app. I need to use "Trim" function to get right data.
How to set up in SQL to void it?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-14 : 17:03:53
We talk about what datatype?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-05-14 : 17:04:24
whats the datatype of the field? Use varchar(n).
Go to Top of Page

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2010-05-14 : 17:14:18
nvarchar
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-05-15 : 04:25:52
I think this is most likely to be something in the Application (or possible the ADO/etc. transport layer)
Hard to imagine its something in the SQL end - although a logic bug in a Stored Procdeure / Trigger doing the Insert might be the cause.

Presumably "xxx" tail is random junk? no pattern to it?
Go to Top of Page
   

- Advertisement -