Hi there,
Firstly can I say please dont assume any knowledge here (DoDo alert!)
I have an old CRM database that has emails in what I believe is an image field completely surrounded by loads of HTML. The field is called RFC822
Someone gave me a query to access it as plain text
SELECT Top 100 LINKRECID, FLAGS, USERID, FOLDER, FOLDER2, ACCOUNTNO, CREATEON, MAILSIZE, MAILDATE, MAILTIME, MAILREF, LOPRECID, MAILID, EXT,
dbo.udf_StripHTML1 ( CAST(CAST(RFC822 AS varbinary(MAX)) AS varchar(4000))) AS RFC822, recid FROM dbo.MAILBOX Where ext = 'eml'
This works fine but the HTML is still there.
So, they gave me some script to create a function that strips the HTML. it's called udf_StripHTML1
I know I have created it correctly becasue I see it in the prgammability folder in my database
My question is how to use the function in my query above.
I have tried the below. The query runs but the output is the same as in the first query
SELECT Top 100 LINKRECID, FLAGS, USERID, FOLDER, FOLDER2, ACCOUNTNO, CREATEON, MAILSIZE, MAILDATE, MAILTIME, MAILREF, LOPRECID, MAILID, EXT,
dbo.udf_StripHTML1 ( CAST(CAST(RFC822 AS varbinary(MAX)) AS varchar(4000))) AS RFC822, recid FROM dbo.MAILBOX Where ext = 'eml'
Am i putting it in the wrong place?
The query window doesnt seem to recognise the function