Forum Moderators: open
'celldata ' rather than
'celldata'
Unfortunately there are over 3000 rows, so manually getting rid of these extra spaces would be a pain.
I have also tried copying the data from one table to another, but using the rtrim() function in the script ..... but it doesn't seem to get rid of the white space. I guess this is because it thinks the spaces are characters.
Does anyone know of a more efficient way to get rid of these extra spaces without manually going through 3K + rows?
Cheers,
Webboy
So if you've have char(20) defined as an example and TEST is the value you should expect TEST to look like this:
'TEST '
select cast(ColName as varchar(20)) as [sample] from [yourTableName]