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

concatenate question 1

Status
Not open for further replies.

Palmyra

Programmer
Jan 5, 2007
150
US
select old_case,
old_case + SUBSTRING(reference_text, 5, LEN(reference_text))+ '0' AS 'Matter' ,
reference_text
FROM...

is returning

old_case Matter reference_text
F1234- F1234-0147 0 207-0147

instead of the desired


old_case Matter reference_text
F1234- F1234-01470 207-0147

I guess I have spaces I need to strip before I concatenate the '0'

Can someone help?

Thanks.
 
You might what to try
Code:
SUBSTRING(reference_text, 5, LEN(reference_text)[red]-5[/red])

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top