cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Nodejs: Insert HTML content in Hana Table

former_member25214
Participant
0 Likes
688

Hi, I'm having difficulty in insertion of a string that contains special characters. Below is my query

INSERT INTO "3D5F24CF599F49B2B3D8FD219665A30B"."TEST_FAQ" VALUES(
	'2021-02-10T12:41:01.928Z'/*CREATEDAT <TIMESTAMP>*/,
	'admin'/*CREATEDBY <NVARCHAR(255)>*/,
	'2021-02-10T12:41:01.928Z'/*MODIFIEDAT <TIMESTAMP>*/,
	'admin'/*MODIFIEDBY <NVARCHAR(255)>*/,
	'5e3efc3e-6b9d-11eb-9439-0242ac130002'/*ID <NVARCHAR(36)>*/,
	'That's my question'/*QUESTION <NVARCHAR(5000)>*/,
	<p style='box-shadow: 1px 1px 5px #999999;position: relative;margin: 5px 10px;'><p style='padding: 10px;border: 1px solid transparent;'><p style='font-size:16px;word-wrap: break-word;'>Job Description
</p><p><p><strong>Primary Duties and Responsibilities</strong></p><ul><li>'/*ANSWER <NVARCHAR(5000)>*/
)


It gives me incorrect syntax error. Do I have to change my datatype ? How should I do this ?

View Entire Topic
former_member25214
Participant
0 Likes

I have to escape and using escape() function in nodejs. and use unescape after fetching ot from the database.