{"id":6367,"date":"2023-08-04T07:14:00","date_gmt":"2023-08-04T05:14:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=6367"},"modified":"2023-10-21T21:16:41","modified_gmt":"2023-10-21T19:16:41","slug":"implicit-conversion-from-xml-to-nvarchar","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/","title":{"rendered":"Implicit conversion from data type XML to NVARCHAR T-SQL error"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-text-align-left\"><strong><em>How to fix the SQL Server Error Implicit conversion from data type XML to NVARCHAR is not allowed?<\/em><\/strong><\/h4>\n\n\n\n<p>How to convert XML into NVARCHAR with SQL Server? To avoid the SQL Server error conversion from XML to NVARCHAR. The exact message is &#8220;Implicit conversion from data type xml to nvarchar is not allowed. Use the CONVERT function to run this query.&#8221;. With SQL Server data, it is useful to combine numerical columns, alphanumeric strings, and XML typed columns.<\/p>\n\n\n\n<p>In addition, to easily query XML data, it&#8217;s very convenient to convert this XML column to an NVARCHAR one, so it is possible, for example, to filter its data. In this post, we do not use an XML column but an XML variable and an NVARCHAR variable.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#1-sql-server-error-implicit-conversion-from-data-type-xml-to-nvarchar\" >1. SQL Server Error Implicit conversion from data type XML to NVARCHAR<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#2-t-sql-query-to-convert-xml-into-nvarchar-datatype\" >2. T-SQL query to convert XML into NVARCHAR datatype<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#3-convert-an-xml-column-to-nvarchar-datatype-without-error\" >3. Convert an XML column to NVARCHAR datatype without error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#4-conclusion-on-xml-conversion-error-with-sql-server\" >4. Conclusion on XML conversion error with SQL Server<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-sql-server-error-implicit-conversion-from-data-type-xml-to-nvarchar\"><\/span>1. SQL Server Error Implicit conversion from data type XML to NVARCHAR<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, let&#8217;s consider this very simple XML example, a Tech company have three employees. It could be a high potential startup, yes! Note that the code works the same way with 30 employees. Furthermore, to manage a list of thousands of employees, then use&nbsp;NVARCHAR(MAX), and consider storing data into tables.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;company>\n &lt;employee>SMITH&lt;\/employee>\n &lt;employee>WILKINS&lt;\/employee>\n &lt;employee>JOHNSON&lt;\/employee>\n&lt;\/company><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2-t-sql-query-to-convert-xml-into-nvarchar-datatype\"><\/span>2. T-SQL query to convert XML into NVARCHAR datatype<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For example, if you use the XML typed column without explicit conversion to NVARCHAR type.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">DECLARE @My_Xml \tXML;\nDECLARE @My_String \tNVARCHAR(500);\n\nSET \t@My_Xml =\n    '&lt;enterprise>\n        &lt;employee>SMITH&lt;\/employee>\n        &lt;employee>WILKINS&lt;\/employee>\n        &lt;employee>JOHNSON&lt;\/employee>\n    &lt;\/enterprise>';\n    \nSET \t@My_String = @My_Xml ;\nSELECT \t@My_String;<\/pre>\n\n\n\n<p>After executing the query, the SQL Server displays this error:<\/p>\n\n\n\n<p><em>Implicit conversion from data type xml to nvarchar is not allowed. Use the CONVERT function to run this query.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-convert-an-xml-column-to-nvarchar-datatype-without-error\"><span class=\"ez-toc-section\" id=\"3-convert-an-xml-column-to-nvarchar-datatype-without-error\"><\/span>3. Convert an XML column to NVARCHAR datatype without error <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>So obviously the solution is to use the CONVERT() SQL Server function to convert the XML type to NVARCHAR or VARCHAR type. So, this simple query allows you to query a table containing XML columns and even do search with LIKE keywords for example.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">DECLARE @My_Xml \tXML;\nDECLARE @My_String \tNVARCHAR(500);\n\nSET \t@My_Xml =\n'&lt;enterprise>\n    &lt;employee>SMITH&lt;\/employee>\n    &lt;employee>WILKINS&lt;\/employee>\n    &lt;employee>JOHNSON&lt;\/employee>\n&lt;\/enterprise>';\n\nSET \t@My_String = CONVERT(VARCHAR(500), @My_Xml);\nSELECT \t@My_String;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4-conclusion-on-xml-conversion-error-with-sql-server\"><\/span>4. Conclusion on XML conversion error with SQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To conclude, the CONVERT SQL function allows to easily convert and manipulate XML tags. This article explains how to avoid the SQL Server classical conversion error from data type XML to Nvarchar. To go further check also the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/data-types\/data-types-transact-sql?view=sql-server-ver15\">data types details in the official documentation from SQL Server<\/a>.<\/p>\n\n\n\n<p>Finally, this post explains how to avoid SQL Server Implicit conversion from data type XML to nvarchar Error and convert XML into NVARCHAR, want to learn more about SQL Server string management? Check out the section below with more tutorials.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"dOMvxCaNdM\"><a href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-string-longer-than-8000-chars\/\">SQL Server string longer than 8000 characters<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;SQL Server string longer than 8000 characters&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-string-longer-than-8000-chars\/embed\/#?secret=R4tccIGRvq#?secret=dOMvxCaNdM\" data-secret=\"dOMvxCaNdM\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Tutorials on how to fix SQL Server errors<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/expert-only.com\/en\/errors\/violation-of-unique-key-constraint-cannot-insert-duplicate\/\">How to avoid unique key constraint violation with SQL Server?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/t-sql\/split-delimited-text-with-sql-server-xml-string-split-functions\/\">Tutorial to split text with XML or STRING_SPLIT function in SQL Server.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/t-sql\/split-text-after-character-with-sql-server-substring\/\">How to split a text after a specific character with SQL Server?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-text-with-more-than-8000-characters\/\">Tutorial to manage T-SQL text variables with more than 8000 characters.<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-left\"><strong><em>This post is useful? Share it \ud83d\ude42&nbsp;<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to fix the SQL Server Error Implicit conversion from data type XML to NVARCHAR is not allowed? How to convert XML into NVARCHAR with SQL Server? To avoid the SQL Server error conversion from XML to NVARCHAR. The <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\" title=\"Implicit conversion from data type XML to NVARCHAR T-SQL error\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":5797,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[454],"tags":[],"class_list":{"0":"post-6367","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-t-sql"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Implicit conversion from data type XML to NVARCHAR T-SQL error<\/title>\n<meta name=\"description\" content=\"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implicit conversion from data type XML to NVARCHAR T-SQL error\" \/>\n<meta property=\"og:description\" content=\"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-04T05:14:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-21T19:16:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Implicit conversion from data type XML to NVARCHAR T-SQL error\",\"datePublished\":\"2023-08-04T05:14:00+00:00\",\"dateModified\":\"2023-10-21T19:16:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\"},\"wordCount\":469,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg\",\"articleSection\":[\"T-SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\",\"url\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\",\"name\":\"Implicit conversion from data type XML to NVARCHAR T-SQL error\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg\",\"datePublished\":\"2023-08-04T05:14:00+00:00\",\"dateModified\":\"2023-10-21T19:16:41+00:00\",\"description\":\"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implicit conversion from data type XML to NVARCHAR T-SQL error\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Implicit conversion from data type XML to NVARCHAR T-SQL error","description":"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/","og_locale":"en_US","og_type":"article","og_title":"Implicit conversion from data type XML to NVARCHAR T-SQL error","og_description":"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.","og_url":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2023-08-04T05:14:00+00:00","article_modified_time":"2023-10-21T19:16:41+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Implicit conversion from data type XML to NVARCHAR T-SQL error","datePublished":"2023-08-04T05:14:00+00:00","dateModified":"2023-10-21T19:16:41+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/"},"wordCount":469,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg","articleSection":["T-SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/","url":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/","name":"Implicit conversion from data type XML to NVARCHAR T-SQL error","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg","datePublished":"2023-08-04T05:14:00+00:00","dateModified":"2023-10-21T19:16:41+00:00","description":"To avoid the SQL Server error implicit conversion from data type XML to NVARCHAR is not allowed, use XML type and CONVERT function combined.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/motivation_dark_coffee-BB67D4004E4_1920x1080.jpeg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/t-sql\/implicit-conversion-from-xml-to-nvarchar\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Implicit conversion from data type XML to NVARCHAR T-SQL error"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/6367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=6367"}],"version-history":[{"count":3,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/6367\/revisions"}],"predecessor-version":[{"id":27633,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/6367\/revisions\/27633"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/5797"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=6367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=6367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=6367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}