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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove space from field

Status
Not open for further replies.

ynnepztem

Programmer
Aug 2, 2001
54
US
I have a stored procedure that concatenates two fields into one. The problem is that it puts a space between the two values. I need to know how to either take the space out or how to concatenate them without the space going there in the first place.

My stored procedure is as follows:

ALTER proc SetID
as
update ss4input
set id = datereceived + ein

The datereceived field is just an eight digit date like 10/21/02
The ein field is a nine digit field like 123456789

My result is 10/21/02 123456789 and it should be
10/21/02123456789
Any help is appreciated.

I am using SQL Server 2000 and Windows NT 4.0
 
hi,

try this. it should work




ALTER proc SetID
as
update ss4input
set id = RTrim(datereceived) + LTrim(ein)


bye
miq

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top