I am pulling data from an as400. everything was fine when the char size on the 400 was 1. the 400 admins changes the char size to three and it look like it's at the thrid position from the left. I combine three fields together to make one unique record..
Select * ,Convert(varchar(40),rtrim(DocNO) + left(PAGE,1) + ltrim(rtrim(LINE)) + '*' + rtrim(CONTNO) + '-'+ rtrim(SEQNO))
AS [DRUMNO]from openquery(AS400,'SELECT blaaaa
this is the field that wont trim
ltrim(rtrim(LINE))
does anyone know how I can force this to trim both r and l
thanks
Select * ,Convert(varchar(40),rtrim(DocNO) + left(PAGE,1) + ltrim(rtrim(LINE)) + '*' + rtrim(CONTNO) + '-'+ rtrim(SEQNO))
AS [DRUMNO]from openquery(AS400,'SELECT blaaaa
this is the field that wont trim
ltrim(rtrim(LINE))
does anyone know how I can force this to trim both r and l
thanks