Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8259147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:47:31+00:00 2026-06-08T02:47:31+00:00

Hi i have an xml string DECLARE @XmlQue NTEXT SET @XmlQue='<?xml version=1.0 encoding=UTF-16?><Template TId=1>

  • 0

Hi i have an xml string

DECLARE @XmlQue     NTEXT

SET @XmlQue='<?xml version="1.0" encoding="UTF-16"?><Template TId="1">
       <QueInfo QId="1" QDetails="Are you " IsYes="Yes" IsNo="No" Eligibleyes="Y" Eligibleno="N"/>
       <QueInfo QId="2" QDetails=" राज्य " IsYes="Yes" IsNo="No" Eligibleyes="Y" Eligibleno="N"/>
     </Template>'

i want to insert the data in a table having NTEXT data type in some columns

i have written the following insert statement.

INSERT INTO ExpertSystem_Master 
    SELECT QIdx,@TemplateId,QDetailsx,IsYesx,IsNox,Eligibleyesx,Eligiblenox,0,0
    FROM 
    OPENXML(@XmlHdl,'/Template/QueInfo',1)
    WITH
    (    QIdx           INT '@QId',
         QDetailsx      Ntext '@QDetails',
         IsYesx         Ntext  '@IsYes', 
         IsNox          Ntext  '@IsNo', 
         Eligibleyesx   CHAR(1) '@Eligibleyes',
         Eligiblenox    CHAR(1) '@Eligibleno'   
    )

The data is inserted in the table but the issue is instead of setting ” राज्य” ,the data is inserted as “?????”

when i try to insert the data directly it is inserted properly,the issue is while parsing it with OPENXML.

can any one help?? am i missing something?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:47:32+00:00Added an answer on June 8, 2026 at 2:47 am

    put an N before your text.. example:

    SET @XmlQue=N'<?xml version="1.0" encoding="UTF-16"?><Template TId="1"> 
           <QueInfo QId="1" QDetails="Are you " IsYes="Yes" IsNo="No" Eligibleyes="Y" Eligibleno="N"/> 
           <QueInfo QId="2" QDetails=" राज्य " IsYes="Yes" IsNo="No" Eligibleyes="Y" Eligibleno="N"/> 
         </Template>' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML string as follows: <?xml version=1.0 encoding=utf-8?> <document id=0 name=RegSimple Version=0.1>
I have a list view declared in my xml: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have my custom attr.xml document in which I specified declare-styleable : <?xml version=1.0
So, this is my manifest: <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=info.dierrelabs.h4m android:versionCode=1 android:versionName=1.0> <uses-sdk
I have the following XML data in SQLServer 2008 R2 DECLARE @data XML SET
I have an xml string such as this: <s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/> <s:Body> <ExecuteResponse xmlns=http://schemas.microsoft.com/xrm/2011/Contracts/Services> <ExecuteResult
I have a xml string: <Test> Result : this is the result</Test> How do
I have an xml string below that I've turned into an object using $content
I have an XML string like <Segment xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:type=Air> <carrier /> ... </Segment> I
I'm trying to turn this XML string into a select I have @Schedule XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.