TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
278.1k
How to replace sub string by stuff ?
Aug 23 2020 9:44 PM
I work on sql server 2012 I need to replace substring by stuff separated stick |
SELECT
DISTINCT
[InputID],PART_ID,[Vendor ID],Manufacturer,[Digi-
Key
Part
No
.] ,[Mfr Part
No
.],[Description],Category,Family ,Obsolete ,[Non-Stock]
, [Part_Status],partNumber,CompanyName,DKFeatureName2,[Variant Number],IsUnit,
SUBSTRING
((
SELECT
isnull
(StarFormat,
''
) + Value+
isnull
(endFormat,
''
)
FROM
#FinalTable
WHERE
([InputID] = Results.[InputID]
and
DkFeatureId = Results.DkFeatureId)
--FOR XML PATH(''),TYPE).value('(./text())[1]','VARCHAR(MAX)')
FOR
XML PATH(
''
),TYPE).value(
'.'
,
'NVARCHAR(MAX)'
)
,1,5000)
AS
Value
--,Results.accepted_value_value
FROM
#FinalTable Results
where
StatusId=3
and what is meaning of using type.value for xml path
Reply
Answers (
2
)
Text of value changed by adding 1 when move data to #ff why and how s?
Select from two tables