October 6, 2009 at 8:23 am
Hello,
Please help me.
I want to add a string into string. 🙂
initial string
[2001],[2002],[2003], . . . . . .
after adding
#var.[2001],#var.[2002],#var.[2003], . . . . . .
many thanks
October 6, 2009 at 8:42 am
USE REPLACE command to replace [ with #var. expression.:-)
REPLACE('[2001],[2002],[2003]','[','#var.')
You may want to declare your string as a variable.
Run this code to verify the result:
SELECT REPLACE('[2001],[2002],[2003]','[','#var.')
October 6, 2009 at 8:43 am
You can also look into the STUFF function.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 6, 2009 at 8:57 am
thanks,
I found with 'replaces' ...but it's different from your code ... I think I'll use yours.
many thanks
October 6, 2009 at 9:08 am
m_belhocine (10/6/2009)
thanks,I found with 'replaces' ...but it's different from your code ... I think I'll use yours.
many thanks
You are welcome.:-)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply