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
 separate with hyphen to string again

Author  Topic 

paritosh
Starting Member

42 Posts

Posted - 2012-08-17 : 01:24:17
HI ALL

I HAVE STRING SUPPOSE

STRING :-
AD675498IJU76

I WANT TO SEPARATE WITH HYPHEN (-)
BUT EVERY TIME POSITION IS NOT FIX.
ASSUME FIRST TIME POSITION IS :- 4
THEN RESULT : -

AD67-5498IJU76

ASSUME NEXT TIME POSITION IS :- 4,6
THEN RESULT : -

AD67-54-98IJU76

ASSUME NEXT TIME POSITION IS :- 4,7
THEN RESULT : -

AD67-549-8IJU76

I WANT TO DYANAMIC QUERY FOR SOLVE THIS PROBLEM

THANKS IN ADVANCE.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-08-17 : 01:35:10
see http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=177912


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -