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
 General SQL Server Forums
 New to SQL Server Programming
 Remove empty space followed by a value

Author  Topic 

Vaishu
Posting Yak Master

178 Posts

Posted - 2007-08-08 : 10:16:26
Hi

I have datacloum called 'code'. When I use
@imglink+''+code+''+'.jpg' as [main-image-url],'
in my stored procedure. I should get the folowing

http://www.batterymasters.co.uk/ImageResizeCache/productImages/Pack/ACCFUFN076360A.jpg
But I am getting like the one below

http://www.batterymasters.co.uk/ImageResizeCache/productImages/Pack/AABFUFN076360A.       jpg


So, some of them are fine but most of them seperated by blank space. I thing the datacolum 'code' has value follwed by empty string like below
'ABFUFN076360A     '

SO HOW DO I REMOVE EMPTY STRING AND GET ONLY 'ABFUFN076360A' instead of
'ABFUFN076360A      '
in my STORED PROCEDURE.

Please help



ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2007-08-08 : 10:21:12
RTRIM(code)

Duane.
Go to Top of Page

Vaishu
Posting Yak Master

178 Posts

Posted - 2007-08-09 : 06:27:42
Thanks a lot. It works
Go to Top of Page
   

- Advertisement -