- Posts: 1
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, sure , but : only when editing without HTML editor, it's not shown on browse or export etc … i never see such issue.tpartner wrote: 2) Probably junk copied from MS Word.
Please Log in to join the conversation.
Please Log in to join the conversation.
DECLARE @surveyid varchar(50) SET @surveyid = 'ENTER YOUR SID HERE' DECLARE @importquestions as varchar(3000) SET @importquestions = 'SELECT * INTO MSLimeSurvey25.dbo.lime_questions FROM openquery(LIMESURVEY25, ''SELECT * FROM limesurvey25.lime_questions WHERE language=''''en'''' AND sid='+@surveyid+''')' EXEC(@importquestions) IF COL_LENGTH('dbo.[lime_questions]','LimeColumnName') IS NULL BEGIN ALTER TABLE dbo.[lime_questions] ADD LimeColumnName nvarchar(128) END UPDATE [dbo].[lime_questions] SET [LimeColumnName] = cast([sid] as varchar(50))+'X'+cast([gid] as varchar(50))+(case when [parent_qid] = 0 then 'X'+ cast([qid] as varchar(50)) ELSE 'X'+ cast([parent_qid] as varchar(50))+[title] END) IF COL_LENGTH('dbo.[lime_questions]','question') IS NOT NULL BEGIN ALTER TABLE dbo.[lime_questions] Alter Column question varchar(MAX) END
USE [MSLimeSurvey25] GO /****** Object: UserDefinedFunction [dbo].[StripHtml] Script Date: 8/18/2021 11:30:45 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[StripHtml] (@HTMLText VARCHAR(MAX)) RETURNS VARCHAR(MAX) AS BEGIN DECLARE @Start INT DECLARE @End INT DECLARE @Length INT DECLARE @TempStr varchar(MAX) SET @Start = CHARINDEX('<',@HTMLText) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText)) SET @Length = (@End - @Start) + 1 WHILE @Start > 0 AND @End > 0 AND @Length > 0 BEGIN SET @HTMLText = STUFF(@HTMLText,@Start,@Length,'') SET @Start = CHARINDEX('<',@HTMLText, @End) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText, @Start)) SET @Length = (@End - @Start) + 1 END RETURN RTRIM(LTRIM(@HTMLText)) END
Please Log in to join the conversation.
Please Log in to join the conversation.