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
Nepethya Rana
NA
335
151.9k
Query to get data which has html tag from db Table
Oct 18 2017 3:05 PM
I do have table which has data as in html tags.
I need to export these data to excel file as for report.
But since one of the columns has data as html tags, Image tags etc, How do i get plain text out of it?
For example :
If a row has data :
Truck 1
1497 pc
Projected time out on Day 3 will be around 4pm
I want as data in my excel as
Truck 1
1497 pc
Projected time out on Day 3 will be around 4pm
if only it is possible other wise seperate is
and
tag with comma.
and if data is image link ,
I just want the link in my excel .
This is my current function that returns with html tags
ALTER FUNCTION [dbo].[ufnGetProjectNotes](@ProjectID int)
RETURNS nvarchar(max)
AS
BEGIN
DECLARE @projectNotes nvarchar(max);
SELECT @projectNotes =stuff( (SELECT ','+Notes
FROM [StoreDevelopment].[dbo].[ProjectNotes] p2
WHERE p2.ProjectID = p1.ProjectID
FOR XML PATH(''), TYPE).value('.', 'nvarchar(max)')
,1,1,'')
FROM [StoreDevelopment].[dbo].[ProjectNotes] p1
GROUP BY ProjectID having projectid=@ProjectID;
RETURN @projectNotes;
END
How do i write the query ?
Reply
Answers (
1
)
Insert same data in two different database simultaneously
Compare 2 sets of columns in same table